diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-10-20 22:34:11 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-10-20 22:34:11 +0300 |
commit | e0ace0c722ee06f961bad6dd15abf9ba68ea540e (patch) | |
tree | cebb7ccd24bf355a576751d71d9f8736bd72b53b /indra/newview/app_settings/shaders/class1/deferred | |
parent | 589a167147fd4a316f4cf588bbb2aaa103c9d3bb (diff) | |
parent | e45b6159666b3aa271eaaa366fb4bcade2c2a28b (diff) |
Merge branch 'master' into DRTVWR-570-maint-Q
# Conflicts:
# indra/newview/llnetmap.cpp
# indra/newview/llnetmap.h
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 02d83925ea..b26194f278 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -202,7 +202,7 @@ VARYING vec2 vary_texcoord2; uniform float env_intensity; uniform vec4 specular_color; // specular color RGB and specular exponent (glossiness) in alpha -#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_MASK) +#ifdef HAS_ALPHA_MASK uniform float minimum_alpha; #endif @@ -227,11 +227,12 @@ void main() vec4 diffcol = texture2D(diffuseMap, vary_texcoord0.xy); diffcol.rgb *= vertex_color.rgb; -#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_MASK) - - // Comparing floats cast from 8-bit values, produces acne right at the 8-bit transition points - float bias = 0.001953125; // 1/512, or half an 8-bit quantization - if (diffcol.a < minimum_alpha-bias) +#ifdef HAS_ALPHA_MASK +#if DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND + if (diffcol.a*vertex_color.a < minimum_alpha) +#else + if (diffcol.a < minimum_alpha) +#endif { discard; } |