From 1407ff316641d75ba6508d3e901f5485f2bce87b Mon Sep 17 00:00:00 2001 From: Thorsten Renk Date: Fri, 9 Feb 2018 14:08:01 +0200 Subject: [PATCH] ALS: do not clamp haze color in object shaders, this leads to mismatch with terrain at high light intensity --- Shaders/model-ALS-ultra.frag | 2 +- Shaders/tree-ALS-shadow.frag | 2 +- Shaders/tree-ALS.frag | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shaders/model-ALS-ultra.frag b/Shaders/model-ALS-ultra.frag index 286e7acb2..cbae4c113 100644 --- a/Shaders/model-ALS-ultra.frag +++ b/Shaders/model-ALS-ultra.frag @@ -639,7 +639,7 @@ void main (void) /// END fog color fragColor = clamp(fragColor, 0.0, 1.0); - hazeColor = clamp(hazeColor, 0.0, 1.0); + //hazeColor = clamp(hazeColor, 0.0, 1.0); ///BEGIN Rayleigh fog /// diff --git a/Shaders/tree-ALS-shadow.frag b/Shaders/tree-ALS-shadow.frag index 67a897408..2e5f418bd 100644 --- a/Shaders/tree-ALS-shadow.frag +++ b/Shaders/tree-ALS-shadow.frag @@ -377,7 +377,7 @@ hazeColor = intensity * normalize(mix(hazeColor, shadedFogColor, (1.0-smoothste // determine the right mix of transmission and haze -hazeColor = clamp(hazeColor,0.0,1.0); +//hazeColor = clamp(hazeColor,0.0,1.0); fragColor.rgb = mix(eqColorFactor * hazeColor * eShade + secondary_light * fog_backscatter(avisibility), fragColor.rgb,transmission); } diff --git a/Shaders/tree-ALS.frag b/Shaders/tree-ALS.frag index d47d14473..2b5293c16 100644 --- a/Shaders/tree-ALS.frag +++ b/Shaders/tree-ALS.frag @@ -357,7 +357,7 @@ hazeColor.rgb = max(hazeColor.rgb, minLight.rgb); // determine the right mix of transmission and haze -hazeColor = clamp(hazeColor,0.0,1.0); +//hazeColor = clamp(hazeColor,0.0,1.0); fragColor.rgb = mix( hazeColor + secondary_light * fog_backscatter(mvisibility), fragColor.rgb,transmission); }