diff options
author | Dave Houlton <euclid@lindenlab.com> | 2020-03-19 06:16:56 +0000 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2020-03-19 06:16:56 +0000 |
commit | a8172323989e303254aea2b360e97e4cd463705a (patch) | |
tree | aae1e2d3b492ab7d8e8ada4f9693f05f96e0209f /indra/newview/app_settings | |
parent | eb45c05466530c56ed9f0d4ce672bcf6dad94abf (diff) | |
parent | ff683a7127d299694a8fece5772f3656d9214edc (diff) |
Merged in euclid_SL-12865 (pull request #42)
SL-12865, add bias to alpha mask values to avoid 8-bit acne
Approved-by: Andrey Kleshchev
Approved-by: Michael Pohoreski
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index f1b13c8825..4198053c99 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -230,7 +230,10 @@ void main() vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a); #if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_MASK) - if (diffuse_linear.a < minimum_alpha) + + // 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 (diffuse_linear.a < minimum_alpha-bias) { discard; } |