summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
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
commit18432d1bc5bdab244b6054af73c5e4cf3d855164 (patch)
tree5149c4c6be95cf60e1db2feae57d630441a99894 /indra/newview/app_settings/shaders/class1/deferred
parent44289977dc36f0a83dd5734d506240b278774efc (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/deferred')
-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
}