Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/gles3/shaders/effect_blur.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ void main() {

#ifdef GLOW_FIRST_PASS

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);
float max_value = max(frag_color.r, max(frag_color.g, frag_color.b));
float feedback = max(smoothstep(glow_hdr_threshold, glow_hdr_threshold + glow_hdr_scale, max_value), glow_bloom);

frag_color = min(frag_color * feedback, vec4(luminance_cap));

Expand Down
4 changes: 2 additions & 2 deletions drivers/gles3/shaders/effects/glow.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void main() {
#endif // USE_MULTIVIEW
color /= luminance_multiplier * 8.0;

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);
float max_value = max(color.r, max(color.g, color.b));
float feedback = max(smoothstep(glow_hdr_threshold, glow_hdr_threshold + glow_hdr_scale, max_value), glow_bloom);

color = min(color * feedback, vec3(glow_luminance_cap));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ void main() {
#endif
frag_color *= blur.glow_exposure;

float luminance = max(frag_color.r, max(frag_color.g, frag_color.b));
float feedback = max(smoothstep(blur.glow_hdr_threshold, blur.glow_hdr_threshold + blur.glow_hdr_scale, luminance), blur.glow_bloom);
float max_value = max(frag_color.r, max(frag_color.g, frag_color.b));
float feedback = max(smoothstep(blur.glow_hdr_threshold, blur.glow_hdr_threshold + blur.glow_hdr_scale, max_value), blur.glow_bloom);

frag_color = min(frag_color * feedback, vec4(blur.glow_luminance_cap)) / blur.luminance_multiplier;
}
Expand Down
4 changes: 2 additions & 2 deletions servers/rendering/renderer_rd/shaders/effects/copy.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ void main() {
#endif
color *= params.glow_exposure;

float luminance = max(color.r, max(color.g, color.b));
float feedback = max(smoothstep(params.glow_hdr_threshold, params.glow_hdr_threshold + params.glow_hdr_scale, luminance), params.glow_bloom);
float max_value = max(color.r, max(color.g, color.b));
float feedback = max(smoothstep(params.glow_hdr_threshold, params.glow_hdr_threshold + params.glow_hdr_scale, max_value), params.glow_bloom);

color = min(color * feedback, vec4(params.glow_luminance_cap));
}
Expand Down