Merge pull request #66327 from Calinou/debanding-fix-adjustments-3.x
This commit is contained in:
commit
faade5f1c3
1 changed files with 6 additions and 6 deletions
|
@ -467,12 +467,6 @@ void main() {
|
||||||
color.rgb = apply_cas(color.rgb, full_exposure, uv_interp, sharpen_intensity);
|
color.rgb = apply_cas(color.rgb, full_exposure, uv_interp, sharpen_intensity);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_DEBANDING
|
|
||||||
// For best results, debanding should be done before tonemapping.
|
|
||||||
// Otherwise, we're adding noise to an already-quantized image.
|
|
||||||
color.rgb += screen_space_dither(gl_FragCoord.xy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Early Tonemap & SRGB Conversion; note that Linear tonemapping does not clamp to [0, 1]; some operations below expect a [0, 1] range and will clamp
|
// Early Tonemap & SRGB Conversion; note that Linear tonemapping does not clamp to [0, 1]; some operations below expect a [0, 1] range and will clamp
|
||||||
color.rgb = apply_tonemapping(color.rgb, white);
|
color.rgb = apply_tonemapping(color.rgb, white);
|
||||||
|
|
||||||
|
@ -507,6 +501,12 @@ void main() {
|
||||||
color.rgb = apply_color_correction(color.rgb, color_correction);
|
color.rgb = apply_color_correction(color.rgb, color_correction);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_DEBANDING
|
||||||
|
// Debanding should be done at the end of tonemapping, but before writing to the LDR buffer.
|
||||||
|
// Otherwise, we're adding noise to an already-quantized image.
|
||||||
|
color.rgb += screen_space_dither(gl_FragCoord.xy);
|
||||||
|
#endif
|
||||||
|
|
||||||
frag_color = color;
|
frag_color = color;
|
||||||
|
|
||||||
#ifdef DISABLE_ALPHA
|
#ifdef DISABLE_ALPHA
|
||||||
|
|
Loading…
Reference in a new issue