I'm trying to deform a planar texture to a spherical texture programmatically so that I can use it on a sphere and not get the weird fish-eye effect. Basically I want to take a normal image and change it such that it maps without the fish-eye-ness on to a sphere.
I'm writing an webgl app, based on some videos I'm basically caching in a youtube bucket, so I can do this server side if necessary (currently using python), or if its fast enough in javascript on the client. Currently drawing spheres and mapping pre-deformed textures using a mercator projection technique, which looks fine, so I just need to figure out how to do the deforming.
Any suggestions very gratefully received! Thank you!