Fix T100134: Cycles faceted triangle normals with motion blur
After recent changes to change barycentric coordinate convention.
This commit is contained in:
@@ -68,8 +68,8 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals kg,
|
|||||||
sd->N = Ng;
|
sd->N = Ng;
|
||||||
/* Compute derivatives of P w.r.t. uv. */
|
/* Compute derivatives of P w.r.t. uv. */
|
||||||
#ifdef __DPDU__
|
#ifdef __DPDU__
|
||||||
sd->dPdu = (verts[0] - verts[2]);
|
sd->dPdu = (verts[1] - verts[0]);
|
||||||
sd->dPdv = (verts[1] - verts[2]);
|
sd->dPdv = (verts[2] - verts[0]);
|
||||||
#endif
|
#endif
|
||||||
/* Compute smooth normal. */
|
/* Compute smooth normal. */
|
||||||
if (sd->shader & SHADER_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 u = sd->u;
|
||||||
float v = sd->v;
|
float v = sd->v;
|
||||||
float w = 1.0f - u - 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]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user