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>2014-01-13 23:40:13 +0400
committerThomas Dinges <blender@dingto.org>2014-01-14 00:17:55 +0400
commit6b61f7f755011c0ceea89a31be218e1ed4940414 (patch)
tree3bd475deb2184546cd44aae02bd917fc14f5aaae /intern/cycles/kernel/svm/svm_checker.h
parentef67b9eec4edbeec8d21fa6db798cd6ef68ab344 (diff)
Code cleanup / Cycles: Don't pass scale to texture functions, do the multiplication in the function call already.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_checker.h')
-rw-r--r--intern/cycles/kernel/svm/svm_checker.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_checker.h b/intern/cycles/kernel/svm/svm_checker.h
index ebc48e16d68..8d1a1a40449 100644
--- a/intern/cycles/kernel/svm/svm_checker.h
+++ b/intern/cycles/kernel/svm/svm_checker.h
@@ -18,10 +18,8 @@ CCL_NAMESPACE_BEGIN
/* Checker */
-ccl_device_noinline float svm_checker(float3 p, float scale)
-{
- p *= scale;
-
+ccl_device_noinline float svm_checker(float3 p)
+{
/* avoid precision issues on unit coordinates */
p.x = (p.x + 0.00001f)*0.9999f;
p.y = (p.y + 0.00001f)*0.9999f;
@@ -47,7 +45,7 @@ ccl_device void svm_node_tex_checker(KernelGlobals *kg, ShaderData *sd, float *s
float3 color2 = stack_load_float3(stack, color2_offset);
float scale = stack_load_float_default(stack, scale_offset, node.w);
- float f = svm_checker(co, scale);
+ float f = svm_checker(co*scale);
if(stack_valid(color_offset))
stack_store_float3(stack, color_offset, (f == 1.0f)? color1: color2);