5 core ComponentTransform
15 material DEF Mat1 ChunkMaterial
21 diffuse 0.8 0.8 0.8 1.0
22 ambient 0.0 0.0 0.0 1.0
23 specular 0.0 0.0 0.0 1.0
31 varying float Diffuse;
32 uniform mat4 OSGWorldMatrix;
33 uniform mat4 OSGViewMatrix;
37 // calculate vertex position in eye coordinates
38 vec4 ecPosition = -normalize(gl_ModelViewMatrix *
41 // compute the transformed normal
42 vec3 tnorm = normalize(gl_NormalMatrix *
45 // Calculate a diffuse light intensity
46 Diffuse = dot(ecPosition.xyz,
50 gl_ProjectionMatrix * OSGViewMatrix * OSGWorldMatrix;
52 // output final vertex information
54 // gl_ModelViewProjectionMatrix * gl_Vertex;
55 gl_Position = vp * gl_Vertex;
59 varying float Diffuse;
66 gl_FragColor = vec4(ColR * Diffuse,
110 url "../../Models/teapot.wrl"
120 core ComponentTransform
140 url "../../Models/teapot.wrl"