diff options
author | Dave Parks <davep@lindenlab.com> | 2011-11-02 13:13:38 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-11-02 13:13:38 -0500 |
commit | 2179e1c1f2f3614678d528fe96640728ce663f2e (patch) | |
tree | f42b13f36f374e6ba915e85cfacd8ab99183a167 /indra/newview/app_settings/shaders/class1/deferred | |
parent | 55f69de90c9b32c7fa25f16ec7d1f41064eff614 (diff) |
SH-2541 Fix for speckles on avatar on some cards -- don't use "maximum_alpha" for alpha tests in shaders as it was always being set to 1.0 anyway.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
7 files changed, 7 insertions, 14 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl index 14b79c37fd..e9989a4e48 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl @@ -28,7 +28,6 @@ out vec4 gl_FragData[3]; #endif uniform float minimum_alpha; -uniform float maximum_alpha; uniform sampler2D diffuseMap; @@ -40,7 +39,7 @@ void main() { vec4 col = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color; - if (col.a < minimum_alpha || col.a > maximum_alpha) + if (col.a < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl index 381fba8813..fdf8d72b38 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl @@ -30,7 +30,6 @@ out vec4 gl_FragData[3]; VARYING vec3 vary_normal; uniform float minimum_alpha; -uniform float maximum_alpha; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; @@ -39,7 +38,7 @@ void main() { vec4 col = diffuseLookup(vary_texcoord0.xy) * vertex_color; - if (col.a < minimum_alpha || col.a > maximum_alpha) + if (col.a < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl index b582ba7f9c..bb20e2ca47 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl @@ -29,7 +29,6 @@ out vec4 gl_FragData[3]; #endif uniform float minimum_alpha; -uniform float maximum_alpha; uniform sampler2D diffuseMap; @@ -40,7 +39,7 @@ void main() { vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); - if (col.a < minimum_alpha || col.a > maximum_alpha) + if (col.a < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl index 5decddebbb..a44173a2a4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl @@ -28,7 +28,6 @@ out vec4 gl_FragData[3]; #endif uniform float minimum_alpha; -uniform float maximum_alpha; uniform sampler2D diffuseMap; @@ -41,7 +40,7 @@ void main() { vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); - if (col.a < minimum_alpha || col.a > maximum_alpha) + if (col.a < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index 71b12326d8..46d42d2a4a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -28,7 +28,6 @@ out vec4 gl_FragColor; #endif uniform float minimum_alpha; -uniform float maximum_alpha; uniform sampler2D diffuseMap; @@ -40,7 +39,7 @@ void main() { float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a; - if (alpha < minimum_alpha || alpha > maximum_alpha) + if (alpha < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl index b934bc6991..ea98d6884c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl @@ -34,12 +34,11 @@ VARYING vec3 vary_normal; VARYING vec2 vary_texcoord0; uniform float minimum_alpha; -uniform float maximum_alpha; void main() { vec4 col = texture2D(diffuseMap, vary_texcoord0.xy); - if (col.a < minimum_alpha || col.a > maximum_alpha) + if (col.a < minimum_alpha) { discard; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl index 29ec6e6bee..20d0170535 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl @@ -28,7 +28,6 @@ out vec4 gl_FragColor; #endif uniform float minimum_alpha; -uniform float maximum_alpha; uniform sampler2D diffuseMap; @@ -39,7 +38,7 @@ void main() { float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a; - if (alpha < minimum_alpha || alpha > maximum_alpha) + if (alpha < minimum_alpha) { discard; } |