Hi Jishen,

I did the opposite, i.e. corrected the optical distortion from a captured 
image. This was done by applying the captured camera image to a plane and then 
using a fragment shader to rectify the image.

https://github.com/bjornblissing/osgueye/blob/master/src/camerarectification.frag

You could do the opposite, i.e. render your scene to a texture then apply a 
fragment shader to distort your image according to your camera parameters.

Note that you will have to calculate the correct field of view of the camera 
you wish to simulate and apply this FoV to your osg::Camera before rendering to 
the texture.

Cheers,
Björn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72555#72555





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to