summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-28 01:22:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-28 01:22:20 -0300
commitaf8d941c55bb97c7651e11e877e30ab9cef38673 (patch)
tree51a38cf4a74a275a6e8b591bbb4af1ec7d3b2dfb /drivers/gles3/shaders
parentb243c26697d8e1892c54c41e7a2e3dc909c4197d (diff)
Added luminance capping to avoid glitches on small dots. closes #17996
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/effect_blur.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gles3/shaders/effect_blur.glsl b/drivers/gles3/shaders/effect_blur.glsl
index b67d06bc10..2518cd7cd0 100644
--- a/drivers/gles3/shaders/effect_blur.glsl
+++ b/drivers/gles3/shaders/effect_blur.glsl
@@ -94,6 +94,7 @@ uniform sampler2D source_dof_original; //texunit:2
uniform float exposure;
uniform float white;
+uniform highp float luminance_cap;
#ifdef GLOW_USE_AUTO_EXPOSURE
@@ -271,7 +272,7 @@ void main() {
float luminance = max(frag_color.r, max(frag_color.g, frag_color.b));
float feedback = max(smoothstep(glow_hdr_threshold, glow_hdr_threshold + glow_hdr_scale, luminance), glow_bloom);
- frag_color *= feedback;
+ frag_color = min( frag_color * feedback, vec4(luminance_cap) );
#endif