Pincushion distortion transform
The current barrel transform is

where

As I understand it, you use that to transform the UV coordinates you sample from a bitmap. This works fine for deferred shaders. But how is the reverse transformation done? My math is a little rusty, but it looks to me that it would be non trivial. That is, if you are doing forward rendering and simply want to adjust the coordinates of the vertices in the vertex shader.
I realize such a transformation only works if the geometry is "small enough", with risk for artifacts.
where
As I understand it, you use that to transform the UV coordinates you sample from a bitmap. This works fine for deferred shaders. But how is the reverse transformation done? My math is a little rusty, but it looks to me that it would be non trivial. That is, if you are doing forward rendering and simply want to adjust the coordinates of the vertices in the vertex shader.
I realize such a transformation only works if the geometry is "small enough", with risk for artifacts.
