diff options
author | Dave Parks <davep@lindenlab.com> | 2013-06-05 12:38:27 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-06-05 12:38:27 -0500 |
commit | 2c46363bfdd6653f492eec831f394ad1f6a52b0e (patch) | |
tree | 6c4de4109be33187267e68e7f97206b5ee0e29ae /indra/newview/app_settings/shaders/class1/deferred | |
parent | 8d4864750e151a2807c78c644eb5af832a869565 (diff) | |
parent | e454c3d48cbefd37de0564a5ba85e0d127850456 (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-development-materials
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 9b2d308824..8d89485e22 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -419,7 +419,7 @@ VARYING vec2 vary_texcoord2; #endif uniform float env_intensity; -uniform vec4 specular_color; +uniform vec4 specular_color; // specular color RGB and specular exponent (glossiness) in alpha #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_MASK) uniform float minimum_alpha; @@ -461,9 +461,10 @@ void main() #endif #if HAS_SPECULAR_MAP - vec4 spec = texture2D(specularMap, vary_texcoord2.xy)*specular_color; + vec4 spec = texture2D(specularMap, vary_texcoord2.xy); + spec.rgb *= specular_color.rgb; #else - vec4 spec = specular_color; + vec4 spec = vec4(specular_color.rgb, 1.0); #endif #if HAS_NORMAL_MAP @@ -492,7 +493,7 @@ void main() vec4 final_specular = spec; #if HAS_SPECULAR_MAP - vec4 final_normal = vec4(encode_normal(normalize(tnorm)), min(spec.a, env_intensity), 0.0); + vec4 final_normal = vec4(encode_normal(normalize(tnorm)), env_intensity * spec.a, 0.0); final_specular.a = specular_color.a * norm.a; #else vec4 final_normal = vec4(encode_normal(normalize(tnorm)), env_intensity, 0.0); |