diff options
author | Dave Parks <davep@lindenlab.com> | 2012-03-26 15:41:27 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-03-26 15:41:27 -0500 |
commit | 654dd60ca7310db940e09065a3f6e7fec377c956 (patch) | |
tree | d401b682f18da1c5dfbea261ed5da05665d5ab81 /indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | |
parent | b187aeb8f177bd76e792652e773617beff18b47b (diff) | |
parent | ce0f455b7cb5a5d45e7682e4a4180b577eda3c5a (diff) |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 8c96d55342..cf38a2f4f7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -48,7 +48,6 @@ VARYING vec3 vary_ambient; VARYING vec3 vary_directional; VARYING vec3 vary_fragcoord; VARYING vec3 vary_position; -VARYING vec3 vary_light; VARYING vec3 vary_pointlight_col; VARYING vec4 vertex_color; @@ -64,6 +63,12 @@ uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +float calcDirectionalLight(vec3 n, vec3 l) +{ + float a = max(dot(n,l),0.0); + return a; +} + float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight) { //get light vector @@ -128,8 +133,6 @@ void main() // Add windlight lights col.rgb = atmosAmbient(vec3(0.)); - vary_light = light_position[0].xyz; - vary_ambient = col.rgb*diffuse_color.rgb; vary_directional.rgb = diffuse_color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), (1.0-diffuse_color.a)*(1.0-diffuse_color.a))); |