diff options
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/math_float3.h | 4 | ||||
-rw-r--r-- | intern/cycles/util/transform.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/util/math_float3.h b/intern/cycles/util/math_float3.h index 1a0213f2a6d..74f1c98e649 100644 --- a/intern/cycles/util/math_float3.h +++ b/intern/cycles/util/math_float3.h @@ -233,7 +233,7 @@ ccl_device_inline float3 operator/=(float3 &a, float f) return a = a * invf; } -#if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__)) +# if !(defined(__KERNEL_METAL__) || defined(__KERNEL_CUDA__)) ccl_device_inline packed_float3 operator*=(packed_float3 &a, const float3 &b) { a = float3(a) * b; @@ -257,7 +257,7 @@ ccl_device_inline packed_float3 operator/=(packed_float3 &a, float f) a = float3(a) / f; return a; } -#endif +# endif ccl_device_inline bool operator==(const float3 &a, const float3 &b) { diff --git a/intern/cycles/util/transform.h b/intern/cycles/util/transform.h index 1d78dfd1385..80cd37d35e2 100644 --- a/intern/cycles/util/transform.h +++ b/intern/cycles/util/transform.h @@ -366,10 +366,10 @@ ccl_device_inline Transform transform_empty() ccl_device_inline float4 quat_interpolate(float4 q1, float4 q2, float t) { - /* Optix is using lerp to interpolate motion transformations. */ -#ifdef __KERNEL_OPTIX__ + /* Optix and MetalRT are using lerp to interpolate motion transformations. */ +#if defined(__KERNEL_GPU_RAYTRACING__) return normalize((1.0f - t) * q1 + t * q2); -#else /* __KERNEL_OPTIX__ */ +#else /* defined(__KERNEL_GPU_RAYTRACING__) */ /* note: this does not ensure rotation around shortest angle, q1 and q2 * are assumed to be matched already in transform_motion_decompose */ float costheta = dot(q1, q2); @@ -387,7 +387,7 @@ ccl_device_inline float4 quat_interpolate(float4 q1, float4 q2, float t) float thetap = theta * t; return q1 * cosf(thetap) + qperp * sinf(thetap); } -#endif /* __KERNEL_OPTIX__ */ +#endif /* defined(__KERNEL_GPU_RAYTRACING__) */ } ccl_device_inline Transform transform_quick_inverse(Transform M) |