nuclear@0: uniform mat4 world_matrix; nuclear@0: nuclear@0: varying vec3 lpos, wpos, vpos, norm, ldir; nuclear@0: nuclear@0: void main() nuclear@0: { nuclear@0: lpos = gl_Vertex.xyz; nuclear@0: gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; nuclear@0: nuclear@0: vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; nuclear@0: wpos = (world_matrix * gl_Vertex).xyz; nuclear@0: norm = gl_NormalMatrix * gl_Normal; nuclear@0: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; nuclear@0: nuclear@0: ldir = gl_LightSource[0].position.xyz - vpos; nuclear@0: }