Fix T86660 EEVEE: Undefined behaviour in specular_occlusion

Define visibility error to be 1 by default to avoid undefined behaviour.
This commit is contained in:
Clément Foucault
2021-03-20 21:58:04 +01:00
parent 057292e75a
commit 9ca67c47a1

View File

@@ -198,6 +198,9 @@ void occlusion_eval(OcclusionData data,
out float visibility_error,
out vec3 bent_normal)
{
/* No error by default. */
visibility_error = 1.0;
if ((int(aoSettings) & USE_AO) == 0) {
visibility = data.custom_occlusion;
bent_normal = N;