Skip to content

Commit

Permalink
Display: Fix OCS mapping with scaled block
Browse files Browse the repository at this point in the history
  • Loading branch information
deranen committed Jun 14, 2024
1 parent 3302426 commit dd57230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/kernel/svm/tex_coord.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ ccl_device_noinline int svm_rhino_node_tex_coord(KernelGlobals kg,
if (sd->object != OBJECT_NONE) {
Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
if (has_ocs)
tfm = transform_clear_scale(tfm);
tfm = transform_clear_scale(&tfm);
data = transform_point(&tfm, data);
}
}
Expand All @@ -571,7 +571,7 @@ ccl_device_noinline int svm_rhino_node_tex_coord(KernelGlobals kg,
tfm.y = read_node_float(kg, &offset);
tfm.z = read_node_float(kg, &offset);
if (has_ocs)
tfm = transform_clear_scale(tfm);
tfm = transform_clear_scale(&tfm);
data = transform_point(&tfm, data);
}
break;
Expand Down
4 changes: 2 additions & 2 deletions src/util/transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ ccl_device_inline Transform operator*(const Transform a, const Transform b)
}
#endif

ccl_device_inline Transform transform_clear_scale(const Transform &tfm)
ccl_device_inline Transform transform_clear_scale(ccl_private const Transform* tfm)
{
Transform ntfm = tfm;
Transform ntfm = *tfm;

float3 col0 = normalize(make_float3(ntfm.x.x, ntfm.y.x, ntfm.z.x));
float3 col1 = normalize(make_float3(ntfm.x.y, ntfm.y.y, ntfm.z.y));
Expand Down

0 comments on commit dd57230

Please sign in to comment.