Hi all,

I was wondering if anyone has any experience with generating equirectangular projections from 3d scenes on the fly in glsl. Imagine you have a camera inside a sphere, and want to record the entire sphere into one 2d texture. It seems like this is something that would likely already exist.

The projections look something like these

Some more info on these.

There is also this library for generating the image from a 6 cubemap textures, but it would be nice to just go straight from the 3d scene to the projection without the cube map in between.

Thereâ€™s lots of information about how to project the equirectangular texture on to a sphere, but very little that describes how the projection is generated in the first place. Any body have any leads?

There is also this page by Paul Bourke about different transformations, and in particular the section on â€śConverting to and from 6 cubic environment maps and a spherical mapâ€ť seems like it might offer some hints if you want to do it from a cube map.

http://paulbourke.net/geometry/transformationprojection/

Thanks!