13 variables ShaderProgramVariables
44 shaderType GL_VERTEX_SHADER
48 varying float Diffuse;
52 // calculate vertex position in eye coordinates
53 vec4 ecPosition = -normalize(gl_ModelViewMatrix * gl_Vertex);
55 // compute the transformed normal
56 vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal);
58 // Calculate a diffuse light intensity
59 Diffuse = dot(ecPosition.xyz,
62 // output final vertex information
63 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
73 shaderType GL_FRAGMENT_SHADER
76 varying float Diffuse;
83 gl_FragColor = vec4(ColR * Diffuse,
102 url "../../SimpleTeapot/object.wrl"