Hi
You should normalize it unless this is directional light and modelview matrix has no scale
 
05.03.2012, 19:00, "Peterakos" <[email protected]>:
Hello.
I found this shader line in the book:
float intensity = dot(vec3(gl_LightSource[0].position), normal );
i was wondering why he doesnt normalize the light source position.
He loads the cow.osg. 
The normal vector is normalized using: 
normal = normalize(gl_NormalMatrix * gl_Normal);
Thank you for your time.

_______________________________________________
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

Reply via email to