diff options
Diffstat (limited to 'data/shaders/lighting.vert')
-rw-r--r-- | data/shaders/lighting.vert | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/data/shaders/lighting.vert b/data/shaders/lighting.vert index d9306e6..32aa176 100644 --- a/data/shaders/lighting.vert +++ b/data/shaders/lighting.vert @@ -13,10 +13,8 @@ varying vec3 pos; varying vec3 normal; varying vec3 light0vc; -varying vec3 light0half; varying vec3 light1vc; varying vec3 light2vc; -varying vec3 light2hvc; varying vec3 col_ambi_diff; varying vec3 col_emit; @@ -29,17 +27,14 @@ void main() { pos = vert.xyz; normal = gl_NormalMatrix * gl_Normal; - /* Spotlight - positional light */ + /* Light 0: Lander craft's spotlight */ light0vc = gl_LightSource[0].position.xyz - vert.xyz; /* Don't normalise here */ - light0half = normalize(normalize(light0vc) + normalize(-vert.xyz)); - /* Diffuse "background glow" - this can be normalised only once, here, since 'position' - * is really 'direction' and is the same for all vertices. */ + /* Light 1: Diffuse background glow */ light1vc = normalize(vec3(gl_LightSource[1].position)); - /* Fill-in light */ + /* Light 2: Fill-in light for lander */ light2vc = normalize(vec3(gl_LightSource[2].position)); - light2hvc = normalize(vec3(gl_LightSource[2].halfVector - vert)); /* Material properties */ col_ambi_diff = gl_Color.rgb; |