diff --git a/files/shaders/objects_vertex.glsl b/files/shaders/objects_vertex.glsl index 679abda1d..fadbd9898 100644 --- a/files/shaders/objects_vertex.glsl +++ b/files/shaders/objects_vertex.glsl @@ -10,10 +10,8 @@ varying vec3 lighting; #define MAX_LIGHTS 8 -vec3 doLighting(vec4 vertex, vec3 normal, vec3 vertexColor) +vec3 doLighting(vec3 viewPos, vec3 viewNormal, vec3 vertexColor) { - vec3 viewPos = (gl_ModelViewMatrix * vertex).xyz; - vec3 viewNormal = normalize((gl_NormalMatrix * normal).xyz); vec3 lightDir; float d; @@ -28,7 +26,7 @@ vec3 doLighting(vec4 vertex, vec3 normal, vec3 vertexColor) vec3 lightResult = vec3(0.0, 0.0, 0.0); for (int i=0; i