diff options
author | Thomas Dinges <blender@dingto.org> | 2013-05-20 18:38:47 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-05-20 18:38:47 +0400 |
commit | 38dc85f296a27a5641d296c8f41834db41dac18b (patch) | |
tree | b47567b3c6fd455a6a92b359fc92509ff33e85fb /intern/cycles/util | |
parent | 0fb5c9117fdb9ad24184a2dad2ad1c8c66565aaa (diff) |
Math Node:
* Added a Modulo operation to the math node, available in Compositor, Shader and Texture Nodes.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_math.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 6edf7fa3544..6fe1b2bcf54 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -1166,6 +1166,11 @@ __device float safe_divide(float a, float b) return (b != 0.0f)? a/b: 0.0f; } +__device float safe_modulo(float a, float b) +{ + return (b != 0.0f)? fmodf(a, b): 0.0f; +} + /* Ray Intersection */ __device bool ray_sphere_intersect( |