Fix T98128: EEVEE: Regression: Inverted surface normal on MacOS Intel GPU

This seems to be caused by the `!` used in conjunction with a macro.
Using the macro directly as condition does not exhibit this issue.
This commit is contained in:
Clément Foucault
2022-05-23 16:22:36 +02:00
parent 63cf0d0890
commit aea59428eb

View File

@@ -108,9 +108,7 @@ GlobalData init_globals(void)
# endif
surf.barycentric_coords = vec2(0.0);
surf.barycentric_dists = vec3(0.0);
if (!FrontFacing) {
surf.N = -surf.N;
}
surf.N = (FrontFacing) ? surf.N : -surf.N;
# ifdef HAIR_SHADER
vec3 V = cameraVec(surf.P);
/* Shade as a cylinder. */