EEVEE: Fix NaN caused by ensure_valid_reflection()
authorClément Foucault <foucault.clem@gmail.com>
Fri, 28 May 2021 16:02:45 +0000 (18:02 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Fri, 28 May 2021 16:16:56 +0000 (18:16 +0200)
commitc36938297753ac45316f0b10b7d3e2f5307a6aff
treef120db2d47a3e01f45b55fac9a39b73d570a9cbb
parent20e250dae307f9cb833dadc52059193dc1e1b5e5
EEVEE: Fix NaN caused by ensure_valid_reflection()

This was caused by unsafe sqrt calls.

Fixes T86578 white artifacts in EEVEE

Reviewed By: brecht, dfelinto

Differential Revision: https://developer.blender.org/D11428
source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
source/blender/draw/intern/shaders/common_math_lib.glsl