Hi Laith, In OpenGL the camera position is always at 0,0,0, and the scene is transformed into cameras coordinates by the modelview matrix.
So... one has to ask are you wanting to do calculations in the eye/camera coordinates, world coordinates or local object coordinates? You can transform the camera position into world or local object coordinates by multipling by the inverse of the view or modelview matrices respectively. Robert. On Thu, Jan 13, 2011 at 6:34 AM, Laith Dhawahir <[email protected]> wrote: > Heey Guys, > I hope you will fine, > anyway, i have question about how i can get the camera position inside shader > from open scene graph do i must pass it, or open scene graph already do that. > > Thank you! > > Cheers, > Laith > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=35600#35600 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

