From 67511e7f16dad6b2bfb30dcf466372a6f8119940 Mon Sep 17 00:00:00 2001 From: taw27 Date: Fri, 1 Aug 2008 09:31:04 +0000 Subject: Make shader work on ATI git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@204 84d2e878-0bd5-11dd-ad15-13eda11d74c5 --- data/shaders/lighting.vert | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data') 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; -- cgit v1.2.3