Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-06-29 20:23:36 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-06-29 20:47:11 +0300
commit516a060bb38d119a397848d30f6e5923d95f135f (patch)
treeae2e4edcc09d83b7488c0ccac4ad1c2d5199bfb0
parent999f1f75045c38a63f960d29e8bc7b9fd19ad0e7 (diff)
Fix T89523: Cycles OpenCL compile error after recent changes
Also correctly used inverse transposed matrix for normal transform.
-rw-r--r--intern/cycles/kernel/bvh/bvh_util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/bvh/bvh_util.h b/intern/cycles/kernel/bvh/bvh_util.h
index 168c2939136..6c152cbb249 100644
--- a/intern/cycles/kernel/bvh/bvh_util.h
+++ b/intern/cycles/kernel/bvh/bvh_util.h
@@ -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]);