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
commit64797175a14785ac740ae27e647a5b0241700577 (patch)
tree1bd4f3027ef14934465b0ef1cea32011e3dde90f /indra/newview/app_settings/shaders/class1
parent88a1b6676ed825345f0615050b9870b325fb6ef1 (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
}