diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
commit | 98cc2365034a93c69704daa69efb389799cc9627 (patch) | |
tree | 4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl | |
parent | 6ba23344c95157793af9e4154933ae8df61630e8 (diff) |
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl index 66606233cd..7325825d6d 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl @@ -44,8 +44,7 @@ float getDepth(vec2 pos_screen) void main() { - vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz; - norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm + vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz*2.0-1.0; float depth = getDepth(vary_fragcoord.xy); vec3 ccol = texture2DRect(giLightMap, vary_fragcoord.xy).rgb; @@ -57,10 +56,9 @@ void main() for (int i = 0; i < kern_length; i++) { vec2 tc = vary_fragcoord.xy + kern[i].y*dlt; - vec3 sampNorm = texture2DRect(normalMap, tc.xy).xyz; - sampNorm = vec3((sampNorm.xy-0.5)*2.0,sampNorm.z); // unpack norm - - float d = dot(norm.xyz, sampNorm); + vec3 sampNorm = texture2DRect(normalMap, tc.xy).xyz*2.0-1.0; + + float d = dot(norm.xyz, sampNorm); if (d > 0.5) { |