aboutsummaryrefslogtreecommitdiff
path: root/data/shaders/lighting.vert
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-26 23:19:32 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-26 23:19:32 +0000
commited5740b6f667628f344d9dd17686424ce9e2de82 (patch)
tree124d4fe3fd9d04e8f89550c82e5487491b35e889 /data/shaders/lighting.vert
parent5f8d27519c76fd297eb61144ff38bd5d1afa51bb (diff)
Initial normal mapping stuff
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@176 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'data/shaders/lighting.vert')
-rw-r--r--data/shaders/lighting.vert2
1 files changed, 2 insertions, 0 deletions
diff --git a/data/shaders/lighting.vert b/data/shaders/lighting.vert
index 294d5ba..ddbe8ab 100644
--- a/data/shaders/lighting.vert
+++ b/data/shaders/lighting.vert
@@ -12,6 +12,7 @@
varying vec3 normal;
varying vec3 light0vc;
+varying vec3 light0hvc;
varying vec3 light1vc;
varying vec3 light2vc;
varying vec3 light2hvc;
@@ -24,6 +25,7 @@ void main() {
/* Spotlight - positional light */
vec4 vert = gl_ModelViewMatrix * gl_Vertex;
light0vc = gl_LightSource[0].position.xyz - vert.xyz;
+ light0hvc = normalize(gl_LightSource[0].halfVector.xyz);
/* Diffuse "background glow" - this can be normalised only once, here, since 'position'
* is really 'direction' and is the same for all vertices. */