mkSample :: Render -> Double -> Double -> (Double, Double, Double, Double)
mkSample ren x y = (px, py, dx, dy)
        where (w, h) = resolution ren
              px = (2*(x + 0.5)/fromIntegral w - 1)*aspectRatio
              py = 1 - 2*(y + 0.5)/fromIntegral h
              dx = (2*(x + 1.5)/fromIntegral w - 1)*aspectRatio
              dy = 1 - 2*(y + 1.5)/fromIntegral h
              aspectRatio = fromIntegral w/fromIntegral h
mkSample :: Render -> Double -> Double -> (Double, Double, Double, Double)
mkSample ren x y = (px, py, dx, dy)
        where (w, h) = resolution ren
              px = (2*(x + 0.5)/fromIntegral w - 1)*aspectRatio
              py = 1 - 2*(y + 0.5)/fromIntegral h
              dx = (2*(x + 1.5)/fromIntegral w - 1)*aspectRatio
              dy = 1 - 2*(y + 1.5)/fromIntegral h
              aspectRatio = fromIntegral w/fromIntegral h
mkSample ren x y = (px, py, dx, dy)
        where (w, h) = resolution ren
              px = (2*(x + 0.5)/fromIntegral w - 1)*aspectRatio
              py = 1 - 2*(y + 0.5)/fromIntegral h
              dx = (2*(x + 1.5)/fromIntegral w - 1)*aspectRatio
              dy = 1 - 2*(y + 1.5)/fromIntegral h
              aspectRatio = fromIntegral w/fromIntegral h