People have been very kind to me here, thank you for the nice comments, in truth it's only a hack, it's not even a true lensemap that's why it runs fast, it's just a straightforward horizontal interpolation, a flat square is just stretched between the edges of a circle. It's the way almost all the oldschool lenses had to be made once upon a time.

There are better (and probably just as fast) methods for doing this by precalculating a real sphere and just changing the colour of the texels to do a false refraction on the image underneath it, it'd probably look much nicer
