summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2024-02-21 11:33:10 +1100
committerBastiaan Olij <mux213@gmail.com>2024-02-21 11:33:10 +1100
commitc2a4657a70ace55adcde97c22cb23a4cff76e21c (patch)
tree51c02e76c7443c727f4348d54431e27994149207
parent652438a3952ae13e12dd4fd40756311fde81a791 (diff)
downloadredot-engine-c2a4657a70ace55adcde97c22cb23a4cff76e21c.tar.gz
Change glow calculation back to max(r,g,b)
-rw-r--r--drivers/gles3/shaders/effects/glow.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/shaders/effects/glow.glsl b/drivers/gles3/shaders/effects/glow.glsl
index 09f2f8afcb..b43691c737 100644
--- a/drivers/gles3/shaders/effects/glow.glsl
+++ b/drivers/gles3/shaders/effects/glow.glsl
@@ -78,8 +78,8 @@ void main() {
#endif // USE_MULTIVIEW
color /= luminance_multiplier * 8.0;
- float luminance = dot(color, vec3(0.2126, 0.7152, 0.0722));
- float feedback = max(smoothstep(glow_hdr_threshold, glow_hdr_threshold + glow_hdr_scale, luminance), glow_bloom);
+ float feedback_factor = max(color.r, max(color.g, color.b));
+ float feedback = max(smoothstep(glow_hdr_threshold, glow_hdr_threshold + glow_hdr_scale, feedback_factor), glow_bloom);
color = min(color * feedback, vec3(glow_luminance_cap));