Fix T53755: Cycles OpenCL lamp shaders have incorrect normal.

This commit is contained in:
Brecht Van Lommel 2018-01-11 08:42:57 +01:00
parent f12ab4e196
commit 2ca933f457
Notes: blender-bot 2023-02-14 07:47:59 +01:00
Referenced by issue #53683, 2.79a release
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ ccl_device_inline void object_inverse_normal_transform(KernelGlobals *kg, const
Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_TRANSFORM);
*N = normalize(transform_direction_transposed(&tfm, *N));
}
else if(sd->type == PRIMITIVE_LAMP) {
Transform tfm = lamp_fetch_transform(kg, sd->lamp, false);
*N = normalize(transform_direction_transposed(&tfm, *N));
}
#endif
}