Fix NaN values encountered with SSR and Metal (#5156)

This commit is contained in:
Ben Doherty
2022-02-03 13:24:43 -08:00
committed by GitHub
parent 04337fdb68
commit d9cbe60ca6

View File

@@ -573,7 +573,7 @@ vec3 evaluateRefraction(
void evaluateIBL(const MaterialInputs material, const PixelParams pixel, inout vec3 color) {
// specular layer
vec3 Fr;
vec3 Fr = vec3(0.0f);
// screen-space reflections
#if defined(MATERIAL_HAS_REFLECTIONS) && REFLECTION_MODE == REFLECTION_MODE_SCREEN_SPACE