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:
authorThomas Dinges <blender@dingto.org>2013-05-21 17:22:11 +0400
committerThomas Dinges <blender@dingto.org>2013-05-21 17:22:11 +0400
commit6b7d2ed8b67b9d4e44cb89802891799879212897 (patch)
treee52bd3c8f0217925ca1757940df8263a735e61f9 /intern/cycles/kernel/svm/svm_gradient.h
parent54bb3077e1709e37e30bda9e15003c10176140e0 (diff)
Code cleanup / Cycles:
* Use M_2PI_F in more places and do multiplication instead of division in gradient texture.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_gradient.h')
-rw-r--r--intern/cycles/kernel/svm/svm_gradient.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_gradient.h b/intern/cycles/kernel/svm/svm_gradient.h
index 95c662ac28b..9329647aa25 100644
--- a/intern/cycles/kernel/svm/svm_gradient.h
+++ b/intern/cycles/kernel/svm/svm_gradient.h
@@ -42,7 +42,7 @@ __device float svm_gradient(float3 p, NodeGradientType type)
return (3.0f*t - 2.0f*t*r);
}
else if(type == NODE_BLEND_DIAGONAL) {
- return (x + y)/2.0f;
+ return (x + y) * 0.5f;
}
else if(type == NODE_BLEND_RADIAL) {
return atan2f(y, x) / M_2PI_F + 0.5f;