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
path: root/intern
diff options
context:
space:
mode:
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/svm/svm_math_util.h2
-rw-r--r--intern/cycles/util/util_math_float3.h6
2 files changed, 1 insertions, 7 deletions
diff --git a/intern/cycles/kernel/svm/svm_math_util.h b/intern/cycles/kernel/svm/svm_math_util.h
index c87ca0defa7..c07a1e4ed98 100644
--- a/intern/cycles/kernel/svm/svm_math_util.h
+++ b/intern/cycles/kernel/svm/svm_math_util.h
@@ -69,7 +69,7 @@ ccl_device void svm_vector_math(
*vector = make_float3(safe_modulo(a.x, b.x), safe_modulo(a.y, b.y), safe_modulo(a.z, b.z));
break;
case NODE_VECTOR_MATH_FRACTION:
- *vector = fract(a);
+ *vector = a - floor(a);
break;
case NODE_VECTOR_MATH_ABSOLUTE:
*vector = fabs(a);
diff --git a/intern/cycles/util/util_math_float3.h b/intern/cycles/util/util_math_float3.h
index 0d7588da690..c9a5b34aa58 100644
--- a/intern/cycles/util/util_math_float3.h
+++ b/intern/cycles/util/util_math_float3.h
@@ -61,7 +61,6 @@ ccl_device_inline float3 rcp(const float3 &a);
ccl_device_inline float3 sqrt(const float3 &a);
ccl_device_inline float3 floor(const float3 &a);
ccl_device_inline float3 ceil(const float3 &a);
-ccl_device_inline float3 fract(const float3 &a);
#endif /* !__KERNEL_OPENCL__ */
ccl_device_inline float min3(float3 a);
@@ -313,11 +312,6 @@ ccl_device_inline float3 ceil(const float3 &a)
# endif
}
-ccl_device_inline float3 fract(const float3 &a)
-{
- return a - floor(a);
-}
-
ccl_device_inline float3 mix(const float3 &a, const float3 &b, float t)
{
return a + t * (b - a);