You could render to two textures. Pass the normal to the fragment shader and render it's value to the pixels of the second texture.
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harash Sharma Sent: Monday, February 25, 2008 5:20 PM To: OpenSceneGraph Users Subject: [osg-users] Finding Normals at all pixel positions Hi All, In my OSG application, I want to find the normal vector corresponding to each pixel position. It means that after rendering if an image pixel (i,j) comes from an object plane P, I need to find the Normal vector to P. One of the ways would be to use LineSegmentIntersector to find the intersecting plane for pixel (i,j), given the Line of Sight. But doing this for all pixels in the field of view would be a very slow process. It would be very kind if anyone could tell if a faster mechanism to do this is there in OSG and give a pointer to it. Thanks in advance. Regards Harash. ________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. <http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearc h/category.php?category=shopping>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

