Fix: EEVEE: use inverse IOR in BSDF LUT refract()

the `refract()` function require the relative IOR of the media where V
is in to the media where L is in. Because this only affects the
visibility term, the difference is quite small
This commit is contained in:
Weizhen Huang
2023-09-14 15:41:35 +02:00
parent bb7a220e89
commit 4e00410d9e

View File

@@ -99,7 +99,7 @@ vec4 ggx_btdf_split_sum(vec3 lut_coord)
}
/* Refraction. */
vec3 T = refract(-V, H, ior);
vec3 T = refract(-V, H, 1.0 / ior);
float NT = T.z;
/* In the case of TIR, `T == vec3(0)`. */
if (NT < 0.0) {