EEVEE: RenderPass: Improve AO pass if screen space radius is small
This just bypass the occlusion computation if there is no occlusion data. This avoids weird looking occlusion due to the screen space geometric normal reconstruction.
This commit is contained in:
parent
0983e66e03
commit
1540f1df07
|
@ -99,9 +99,12 @@ void main()
|
|||
|
||||
OcclusionData data = occlusion_load(vP, 1.0);
|
||||
|
||||
float visibility = diffuse_occlusion(data, V, N, Ng);
|
||||
|
||||
FragColor = vec4(visibility);
|
||||
if (min_v4(abs(data.horizons)) != M_PI) {
|
||||
FragColor = vec4(diffuse_occlusion(data, V, N, Ng));
|
||||
}
|
||||
else {
|
||||
FragColor = vec4(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue