Properly apply auto exposure with FXAA in GLES3
This commit is contained in:
parent
93172515de
commit
6cefadc233
1 changed files with 4 additions and 3 deletions
|
@ -327,16 +327,17 @@ void main() {
|
|||
vec3 color = textureLod(source, uv_interp, 0.0f).rgb;
|
||||
|
||||
// Exposure
|
||||
float full_exposure = exposure;
|
||||
|
||||
#ifdef USE_AUTO_EXPOSURE
|
||||
color /= texelFetch(source_auto_exposure, ivec2(0, 0), 0).r / auto_exposure_grey;
|
||||
full_exposure /= texelFetch(source_auto_exposure, ivec2(0, 0), 0).r / auto_exposure_grey;
|
||||
#endif
|
||||
|
||||
color *= exposure;
|
||||
color *= full_exposure;
|
||||
|
||||
#ifdef USE_FXAA
|
||||
// FXAA must be applied before tonemapping.
|
||||
color = apply_fxaa(color, exposure, uv_interp, pixel_size);
|
||||
color = apply_fxaa(color, full_exposure, uv_interp, pixel_size);
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEBANDING
|
||||
|
|
Loading…
Reference in a new issue