summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-07 11:34:31 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-07 11:34:31 +0000
commit550922aa84634594c277bd51d2839256f5963ac7 (patch)
tree6ed0726391a9b5684f135eceae1ee21c9ac8294e /indra/newview/app_settings/shaders/class1
parent23f03d9f6cc64d960d8eb05c8fb2cb10f6a4ec6b (diff)
Add a touch of fakey ripple to shadows on the surface of water, as if the water has depth. Using 4th component of the normal map to encode a position displacement (along the normal) in the class2 shadow lookup.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 55c893d73b..ceb7e0fb56 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -133,9 +133,9 @@ void main()
//wavef.z *= 0.1f;
//wavef = normalize(wavef);
- wavef = (norm_mat*vec4(wavef, 1.0)).xyz;
+ vec3 screenspacewavef = (norm_mat*vec4(wavef, 1.0)).xyz;
gl_FragData[0] = vec4(color.rgb, 0.5); // diffuse
gl_FragData[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec
- gl_FragData[2] = vec4(wavef*0.5+0.5, 0.0); // normal
+ gl_FragData[2] = vec4(screenspacewavef*0.5+0.5, screenspacewavef.z*0.5); // normal, displace
}