forked from bartvdbraak/blender
Cycles: Correction to previous commit -- forgot to take instancing into account
This commit is contained in:
parent
9142c062e0
commit
c256072e91
@ -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…
Reference in New Issue
Block a user