Fix T97966: Cycles shadow terminator offset wrong for scaled object instances

Differential Revision: https://developer.blender.org/D14893
This commit is contained in:
Mikhail Matrosov
2022-05-10 18:52:00 +02:00
committed by Brecht Van Lommel
parent dc55e095e6
commit dcce4a59a0

View File

@@ -143,7 +143,7 @@ ccl_device_inline float3 shadow_ray_smooth_surface_offset(
float3 n = N[0] * u + N[1] * v + N[2] * w; /* We get away without normalization */ float3 n = N[0] * u + N[1] * v + N[2] * w; /* We get away without normalization */
if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) { if (!(sd->object_flag & SD_OBJECT_TRANSFORM_APPLIED)) {
object_normal_transform(kg, sd, &n); /* Normal x scale, world space */ object_dir_transform(kg, sd, &n); /* Normal x scale, to world space */
} }
/* Parabolic approximation */ /* Parabolic approximation */