diff options
Diffstat (limited to 'data/shaders/lighting.vert')
-rw-r--r-- | data/shaders/lighting.vert | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/shaders/lighting.vert b/data/shaders/lighting.vert index d6c9bd4..7f9d606 100644 --- a/data/shaders/lighting.vert +++ b/data/shaders/lighting.vert @@ -23,7 +23,7 @@ varying vec3 col_emit; void main() { vec4 vert; - vec3 E, L; + vec4 E; vert = gl_ModelViewMatrix * gl_Vertex; normal = gl_NormalMatrix * gl_Normal; @@ -31,7 +31,7 @@ void main() { /* Spotlight - positional light */ light0vc = vec3(gl_LightSource[0].position - vert); - light0hvc = normalize(E + light0hvc); + light0hvc = normalize(vec3(E) + light0hvc); light0vc = normalize(light0vc); /* Diffuse "background glow" - this can be normalised only once, here, since 'position' @@ -40,7 +40,7 @@ void main() { /* Fill-in light */ light2vc = normalize(vec3(gl_LightSource[2].position)); - light2hvc = normalize(E + light2vc); + light2hvc = normalize(vec3(E) + light2vc); /* Material properties */ col_ambi_diff = gl_Color.rgb; |