diff options
author | graham linden <graham@lindenlab.com> | 2013-05-08 09:16:19 -0700 |
---|---|---|
committer | graham linden <graham@lindenlab.com> | 2013-05-08 09:16:19 -0700 |
commit | 7b1acb186a7025b0464c21c88c0956439c98f3d2 (patch) | |
tree | b01a9c0c617104e4b69a7f5334377cd62d47fc4b /indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | |
parent | 19c755b8512bb2e7ce36924b30c1ed380397a8f4 (diff) | |
parent | 21ba1e9c1e8afeb1b3cf67462f6e16ff8f6ae91a (diff) |
Merged lindenlab/viewer-development-materials into default
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl')
-rwxr-xr-x | indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl index a995e9cba1..847fea6c08 100755 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl @@ -197,11 +197,9 @@ void main() vec4 pos = getPosition(pos_screen); - vec4 nmap4 = texture2DRect(normalMap, pos_screen); - nmap4 = vec4(decode_normal(nmap4.xy),nmap4.w); // unpack norm - float displace = nmap4.w; - vec3 norm = nmap4.xyz; - + vec3 norm = texture2DRect(normalMap, pos_screen).xyz; + norm = decode_normal(norm.xy); // unpack norm + /*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL { frag_color = vec4(0.0); // doesn't matter @@ -210,9 +208,8 @@ void main() float shadow = 0.0; float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz)); - dp_directional_light = pow(dp_directional_light, 0.7); - - vec3 shadow_pos = pos.xyz + displace*norm; + + vec3 shadow_pos = pos.xyz; vec3 offset = sun_dir.xyz * (1.0-dp_directional_light); vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0); |