summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-09 15:02:10 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-09 15:02:10 +0100
commit12d3ba4baee93bcb024fbeee0d6f05df6d02935f (patch)
tree890058e8315e803a0d2f740a9fe4bddcd53706f5 /indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
parent08755849ab126c13580f3af38721f83cb5ce01ce (diff)
Rejig deferred normal-map packing a little, to double its accuracy for free.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index eeaecc157f..8a90199b7c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -82,7 +82,8 @@ void main()
discard;
}
- vec3 norm = texture2DRect(normalMap, frag.xy).xyz*2.0-1.0;
+ vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
+ norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
norm = normalize(norm);
float l_dist = -dot(lv, proj_n);