40 varying float Diffuse;
44 // calculate vertex position in eye coordinates
45 vec4 ecPosition = -normalize(gl_ModelViewMatrix * gl_Vertex);
47 // compute the transformed normal
48 vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal);
50 // Calculate a diffuse light intensity
51 Diffuse = dot(ecPosition.xyz,
54 // output final vertex information
55 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
60 varying float Diffuse;
67 gl_FragColor = vec4(ColR * Diffuse,
84 url "../../SimpleTeapot/object.wrl"