summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-01-30 12:17:04 -0500
committerGeenz <geenz@geenzo.com>2013-01-30 12:17:04 -0500
commitaa1befd689703d9fea50399201911e0f8fca6ac6 (patch)
treec60457d1762d8b1c28a9d40130ba2988f532cd27 /indra/newview/app_settings/shaders/class2/deferred
parent66a01ba4c581d79227b0e67f5f75dc248fcaf7ab (diff)
Specular map support. This is the vast majority of the material parameters implemented at this point for opaque geometry.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index bf4c476138..e95991a635 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -283,8 +283,8 @@ void main()
vec2 tc = vary_fragcoord.xy;
float depth = texture2DRect(depthMap, tc.xy).r;
vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texture2DRect(normalMap, tc).xyz;
- norm = (norm.xyz-0.5)*2.0; // unpack norm
+ vec4 norm = texture2DRect(normalMap, tc);
+ norm.xyz = (norm.xyz-0.5)*2.0; // unpack norm
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
@@ -324,7 +324,7 @@ void main()
//add environmentmap
vec3 env_vec = env_mat * refnormpersp;
col = mix(col.rgb, samplesRGB(textureCube(environmentMap, env_vec).rgb) * 2.2,
- max(spec.a-diffuse.a*2.0, 0.0));
+ max(norm.a-diffuse.a*2.0, 0.0));
}
col = atmosLighting(col);