diff options
author | Dave Parks <davep@lindenlab.com> | 2013-03-27 21:59:14 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-03-27 21:59:14 -0500 |
commit | 6300f4f768de13823a754831797cb34022f87b60 (patch) | |
tree | ae847221ee1a68535e58562cb291441489ab0f82 /indra/newview/app_settings/shaders/class2/deferred | |
parent | 7be396cc985c0274ff05b375a8bf27c0e630666a (diff) |
NORSPEC-61 Hook up material parameters to shaders.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 6 |
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 9df9d75905..ff20b63972 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -278,8 +278,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); @@ -319,7 +319,7 @@ void main() //add environmentmap vec3 env_vec = env_mat * refnormpersp; col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb, - max(spec.a-diffuse.a*2.0, 0.0)); + max(norm.a-diffuse.a*2.0, 0.0)); } col = atmosLighting(col); |