diff options
author | Graham Linden <graham@lindenlab.com> | 2013-09-18 18:24:16 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-09-18 18:24:16 -0700 |
commit | 95e34d86b9d86b3b3c7d3c39620e35b06f8fa9cf (patch) | |
tree | 5a2652bef97f1bb2d76c0b86482cebe2b2505a79 /indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | |
parent | 93503a05ec905ef2a8df39802fdc3475c961f3bc (diff) | |
parent | ad777b46d0fe5d790e43efb1771e9f64f3ad3dfb (diff) |
The unbearable lightness of being norspec
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl')
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index cc63baa422..b40785bbd7 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -55,33 +55,18 @@ mat4 getSkinnedTransform(); #endif #endif -vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol); -void calcAtmospherics(vec3 inPositionEye); - -vec3 atmosAmbient(vec3 light); -vec3 atmosAffectDirectionalLight(float lightIntensity); -vec3 scaleDownLight(vec3 light); -vec3 scaleUpLight(vec3 light); - -VARYING vec3 vary_ambient; -VARYING vec3 vary_directional; VARYING vec3 vary_fragcoord; VARYING vec3 vary_position; -VARYING vec3 vary_pointlight_col; -VARYING vec3 vary_pointlight_col_linear; #ifdef USE_VERTEX_COLOR VARYING vec4 vertex_color; #endif VARYING vec2 vary_texcoord0; - VARYING vec3 vary_norm; uniform float near_clip; -uniform vec3 sun_dir; - void main() { vec4 pos; @@ -134,42 +119,8 @@ void main() vary_norm = norm; vary_position = pos.xyz; - calcAtmospherics(pos.xyz); - -#ifndef USE_VERTEX_COLOR - vec4 diffuse_color = vec4(1,1,1,1); -#endif - //vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.)); - vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a); - - vec3 diff = diffuse_color.rgb; - - - - vary_pointlight_col = diff; - vary_pointlight_col_linear = pow(diff, vec3(2.2)); - - - col.rgb = vec3(0,0,0); - - // Add windlight lights - col.rgb = atmosAmbient(col.rgb); - - float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0); - ambient *= 0.5; - ambient *= ambient; - ambient = (1.0-ambient); - - col.rgb *= ambient; - - vary_ambient = col.rgb*diff.rgb; - - vary_directional.rgb = atmosAffectDirectionalLight(1.0f); - - col.rgb = col.rgb*diff.rgb; - #ifdef USE_VERTEX_COLOR - vertex_color = col; + vertex_color = diffuse_color; #endif #ifdef HAS_SKIN |