Fix T89523: Cycles OpenCL compile error after recent changes
Also correctly used inverse transposed matrix for normal transform.
This commit is contained in:
parent
999f1f7504
commit
516a060bb3
Notes:
blender-bot
2023-02-14 07:17:43 +01:00
Referenced by issue #89523, 3.0 Split kernel error: failed to load kernel_path_init with OpenCL on Linux
|
@ -85,7 +85,9 @@ ccl_device_inline float3 smooth_surface_offset(KernelGlobals *kg, ShaderData *sd
|
|||
const float w = 1 - u - v;
|
||||
float3 P = V[0] * u + V[1] * v + V[2] * w; /* Local space */
|
||||
float3 n = N[0] * u + N[1] * v + N[2] * w; /* We get away without normalization */
|
||||
n = transform_direction(&(sd->ob_tfm), n); /* Normal x scale, world space */
|
||||
|
||||
n = normalize(
|
||||
transform_direction_transposed_auto(&sd->ob_itfm, n)); /* Normal x scale, world space */
|
||||
|
||||
/* Parabolic approximation */
|
||||
float a = dot(N[2] - N[0], V[0] - V[2]);
|
||||
|
|
Loading…
Reference in New Issue