aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-08-01 09:31:04 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-08-01 09:31:04 +0000
commit67511e7f16dad6b2bfb30dcf466372a6f8119940 (patch)
treef703deea7c2a1d4062c62a25c0cb058ea6effd89 /data
parentb1ea4be2d138f5ab6c42aba812826db630fbb55a (diff)
Make shader work on ATI
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@204 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'data')
-rw-r--r--data/shaders/lighting.vert6
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;