Fix T90776: Cycles normal map node produces artifacts
This is caused by a typo in rBb8ecdbcd964a `sd->prim` is the primitive index, but was used to discriminate the primitive type (stored in `sd- >type`).
This commit is contained in:
parent
72f73c0b71
commit
c0dd6f1164
Notes:
blender-bot
2023-12-22 20:14:11 +01:00
Referenced by issue #90854, Normal maps broken in master... again Referenced by issue #90776, Normal maps broken in master
|
@ -267,7 +267,7 @@ ccl_device void svm_node_normal_map(KernelGlobals *kg, ShaderData *sd, float *st
|
|||
|
||||
if (space == NODE_NORMAL_MAP_TANGENT) {
|
||||
/* tangent space */
|
||||
if (sd->object == OBJECT_NONE || (sd->prim & PRIMITIVE_ALL_TRIANGLE) == 0) {
|
||||
if (sd->object == OBJECT_NONE || (sd->type & PRIMITIVE_ALL_TRIANGLE) == 0) {
|
||||
/* Fallback to unperturbed normal. */
|
||||
stack_store_float3(stack, normal_offset, sd->N);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue