mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cycles: Correction to previous commit -- forgot to take instancing into account
This commit is contained in:
parent
9142c062e0
commit
c256072e91
1 changed files with 3 additions and 1 deletions
|
|
@ -147,8 +147,10 @@ ccl_device_inline void triangle_point_normal(KernelGlobals *kg, int object, int
|
|||
float t = 1.0f - u - v;
|
||||
*P = (u*v0 + v*v1 + t*v2);
|
||||
|
||||
/* get object flags, instance-aware */
|
||||
int object_flag = kernel_tex_fetch(__object_flag, object >= 0 ? object : ~object);
|
||||
|
||||
/* compute normal */
|
||||
int object_flag = kernel_tex_fetch(__object_flag, object);
|
||||
if(object_flag & SD_NEGATIVE_SCALE_APPLIED)
|
||||
*Ng = normalize(cross(v2 - v0, v1 - v0));
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue