diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 20:08:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-04 20:08:45 +0300 |
commit | 1c2c468abc9ecbc09eb87eff4da2023ea506d606 (patch) | |
tree | 15d304170fbe5154a38f9d3e3515677451a1652c /intern/cycles | |
parent | 91d365f6df51333757a47b8c18cfd9faae974982 (diff) |
Fix T100134: Cycles faceted triangle normals with motion blur
After recent changes to change barycentric coordinate convention.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/kernel/geom/motion_triangle_shader.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/geom/motion_triangle_shader.h b/intern/cycles/kernel/geom/motion_triangle_shader.h index 236e737b785..413a61b380a 100644 --- a/intern/cycles/kernel/geom/motion_triangle_shader.h +++ b/intern/cycles/kernel/geom/motion_triangle_shader.h @@ -68,8 +68,8 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals kg, sd->N = Ng; /* Compute derivatives of P w.r.t. uv. */ #ifdef __DPDU__ - sd->dPdu = (verts[0] - verts[2]); - sd->dPdv = (verts[1] - verts[2]); + sd->dPdu = (verts[1] - verts[0]); + sd->dPdv = (verts[2] - verts[0]); #endif /* Compute smooth normal. */ if (sd->shader & SHADER_SMOOTH_NORMAL) { @@ -89,7 +89,7 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals kg, float u = sd->u; float v = sd->v; float w = 1.0f - u - v; - sd->N = (u * normals[0] + v * normals[1] + w * normals[2]); + sd->N = (w * normals[0] + u * normals[1] + v * normals[2]); } } |