Fix: EEVEE-Next: Shadow broken for transmission BSDFs

Was not inverting the normal for `shadow_ray_above_horizon_ensure`.
This commit is contained in:
Clément Foucault
2024-04-13 10:50:33 +02:00
parent ba0921e75e
commit a4e9224317

View File

@@ -547,6 +547,7 @@ ShadowEvalResult shadow_eval(LightData light,
vec3 lP = is_directional ? light_world_to_local(light, P) :
light_world_to_local(light, P - light._position);
vec3 lNg = light_world_to_local(light, Ng);
lNg = is_transmission ? -Ng : Ng;
float surface_hit = 0.0;
for (int ray_index = 0; ray_index < ray_count && ray_index < SHADOW_MAX_RAY; ray_index++) {