varying float LightIntensity; varying vec3 MCposition; varying vec3 ECposition; uniform vec3 LightPos; uniform float Scale; void main() { ECposition = vec3( gl_ModelViewMatrix * gl_Vertex ); MCposition = Scale * vec3( gl_Vertex ); vec3 tnorm = normalize( vec3( gl_NormalMatrix * gl_Normal ) ); LightIntensity = dot( normalize(LightPos - ECposition), tnorm ); LightIntensity = abs( LightIntensity ); LightIntensity *= 1.5; gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; }