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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org