nuclear@15: varying vec3 vdir, ldir, normal; nuclear@15: nuclear@15: void main() nuclear@15: { nuclear@15: gl_Position = ftransform(); nuclear@15: nuclear@15: vec3 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; nuclear@15: normal = gl_NormalMatrix * gl_Normal; nuclear@15: vdir = -vpos; nuclear@15: ldir = gl_LightSource[0].position.xyz - vpos; nuclear@15: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; nuclear@15: }