From 74b8dae4b4d403570373dced50df8b741846ca21 Mon Sep 17 00:00:00 2001 From: taw27 Date: Wed, 6 Aug 2008 11:57:49 +0000 Subject: Introduce 'v4conv3' conversion function General fussiness git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@212 84d2e878-0bd5-11dd-ad15-13eda11d74c5 --- data/shaders/lighting.frag | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'data/shaders/lighting.frag') diff --git a/data/shaders/lighting.frag b/data/shaders/lighting.frag index d3e3534..a9febe4 100644 --- a/data/shaders/lighting.frag +++ b/data/shaders/lighting.frag @@ -18,6 +18,9 @@ varying float light0dist; varying vec3 light1vc; varying vec3 light2vc; +varying vec3 col_ambi_diff; +varying vec3 col_emit; + uniform sampler2D texture; uniform sampler2D normalmap; @@ -27,9 +30,6 @@ uniform bool texture_enabled; uniform bool texture_emits; uniform float alpha; -varying vec3 col_ambi_diff; -varying vec3 col_emit; - void main() { vec3 ambi; @@ -49,7 +49,7 @@ void main() { /* Emission */ emit = col_emit; - + if ( fill_light_enabled ) { /* Light 2: Fill-in light for lander */ @@ -77,7 +77,6 @@ void main() { E = normalize(-pos); R = normalize(-reflect(light0vc, norm)); - spec_fac = pow(max(0.0, dot(R, E)), 80.0); spec += vec3(1.0, 1.0, 1.0) * gl_LightSource[0].specular.rgb * spot * falloff * spec_fac; -- cgit v1.2.3