Fix T81741 EEVEE: Ambient Occlusion does not converge properly
This was due to the AO random sampling using the same "seed" as the AA jitter. Decorelating the noise fixes the issue.
This commit is contained in:
parent
30cb4326fe
commit
bf799cb12c
Notes:
blender-bot
2023-02-14 06:17:17 +01:00
Referenced by issue #81741, Eevee Ambient Occlusion is very noisy even with high sample count
|
@ -60,7 +60,11 @@ vec2 get_ao_area(float view_depth, float radius)
|
|||
|
||||
vec2 get_ao_noise(void)
|
||||
{
|
||||
return texelfetch_noise_tex(gl_FragCoord.xy).xy;
|
||||
vec2 noise = texelfetch_noise_tex(gl_FragCoord.xy).xy;
|
||||
/* Decorrelate noise from AA. */
|
||||
/* TODO(fclem) we should use a more general approach for more random number dimentions. */
|
||||
noise = fract(noise * 6.1803402007);
|
||||
return noise;
|
||||
}
|
||||
|
||||
vec2 get_ao_dir(float jitter)
|
||||
|
|
Loading…
Reference in New Issue