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 717090f40e
commit 6dd164a188

@ -175,6 +175,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
}