diff options
author | Olivier Maury <omaury> | 2022-01-07 19:15:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-07 19:20:04 +0300 |
commit | 34d553671daeb5f38d8bbc69ebbdee0f93421000 (patch) | |
tree | 981913cfa7aaa745bda84cf5be18345b45af9970 /intern/cycles/kernel/light | |
parent | ee0928d4be6e1f502eb7208f821d8e049795dadd (diff) |
Fix wrong shadow terminator geometry offset with deformation motion blur
Differential Revision: https://developer.blender.org/D13759
Diffstat (limited to 'intern/cycles/kernel/light')
-rw-r--r-- | intern/cycles/kernel/light/sample.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/kernel/light/sample.h b/intern/cycles/kernel/light/sample.h index 5a4b7c0a302..7dbc783b1bb 100644 --- a/intern/cycles/kernel/light/sample.h +++ b/intern/cycles/kernel/light/sample.h @@ -141,7 +141,14 @@ ccl_device_inline float3 shadow_ray_smooth_surface_offset( KernelGlobals kg, ccl_private const ShaderData *ccl_restrict sd, float3 Ng) { float3 V[3], N[3]; - triangle_vertices_and_normals(kg, sd->prim, V, N); + + if (sd->type == PRIMITIVE_MOTION_TRIANGLE) { + motion_triangle_vertices_and_normals(kg, sd->object, sd->prim, sd->time, V, N); + } + else { + kernel_assert(sd->type == PRIMITIVE_TRIANGLE); + triangle_vertices_and_normals(kg, sd->prim, V, N); + } const float u = sd->u, v = sd->v; const float w = 1 - u - v; |