Hm. If posDir_worldspace is actually the direction from the vertex to the camera (eye), then may be it's not really in world space, but in camera (eye) space? And all of the 2nd pass FS calculations too?
2013/10/7 Marcel Pursche <[email protected]> > Hi, > > your comments are looking good so far. A good name for the > "posDir_worldspace" would be view direction or eye direction. In most > lighting formulas it is abbreviated with V or E. It is the direction from > the vertex to the eye/camera. > There are good wikipedia articles that explain the theoretical background: > lBDRF ( > http://en.wikipedia.org/wiki/Bidirectional_reflectance_distribution_function), > Lambertian Model (http://en.wikipedia.org/wiki/Lambertian), Phong > reflection model (http://en.wikipedia.org/wiki/Phong_reflection_model), > Blinn Phong model ( > http://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model) . You > have implemented the Lambertian model for diffuse light and the Blinn Phong > model for specular light. > > Thank you! > > Cheers, > Marcel > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=56650#56650 > > > > > > _______________________________________________ > 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

