Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/light/sample.h')
-rw-r--r--intern/cycles/kernel/light/sample.h9
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;