diff options
author | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-30 21:02:21 +0000 |
---|---|---|
committer | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-07-30 21:02:21 +0000 |
commit | c8ffb4adf132ba6cf4ed3ad08db9f9bfbe1d7280 (patch) | |
tree | 86980f26ceccc73edb5c9b329b768fb6c48d6ebf /data | |
parent | ec734c362ca2f79683bd876406e8a3c1fa09b443 (diff) |
Small shader tweaks
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@195 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'data')
-rw-r--r-- | data/shaders/lighting.vert | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/shaders/lighting.vert b/data/shaders/lighting.vert index 3647999..914d6ac 100644 --- a/data/shaders/lighting.vert +++ b/data/shaders/lighting.vert @@ -25,7 +25,7 @@ void main() { /* Spotlight - positional light */ vec4 vert = gl_ModelViewMatrix * gl_Vertex; light0vc = gl_LightSource[0].position.xyz - vert.xyz; - light0hvc = vec3(gl_LightSource[0].halfVector - vert.xyz); + light0hvc = vec3(gl_LightSource[0].halfVector - vert); /* Diffuse "background glow" - this can be normalised only once, here, since 'position' * is really 'direction' and is the same for all vertices. */ @@ -33,7 +33,7 @@ void main() { /* Fill-in light */ light2vc = normalize(vec3(gl_LightSource[2].position)); - light2hvc = normalize(vec3(gl_LightSource[2].halfVector)); + light2hvc = normalize(vec3(gl_LightSource[2].halfVector - vert)); /* Material properties */ normal = gl_NormalMatrix * gl_Normal; |