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_voronoi.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_voronoi.h')
-rw-r--r--intern/cycles/kernel/svm/svm_voronoi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/kernel/svm/svm_voronoi.h b/intern/cycles/kernel/svm/svm_voronoi.h
index 604fd3404c5..7f597dc8bff 100644
--- a/intern/cycles/kernel/svm/svm_voronoi.h
+++ b/intern/cycles/kernel/svm/svm_voronoi.h
@@ -18,10 +18,10 @@ CCL_NAMESPACE_BEGIN
/* Voronoi */
-ccl_device_noinline float4 svm_voronoi(NodeVoronoiColoring coloring, float scale, float3 p)
+ccl_device_noinline float4 svm_voronoi(NodeVoronoiColoring coloring, float3 p)
{
/* compute distance and point coordinate of 4 nearest neighbours */
- float4 dpa0 = voronoi_Fn(p*scale, 1.0f, 0, -1);
+ float4 dpa0 = voronoi_Fn(p, 1.0f, 0, -1);
/* output */
float fac;
@@ -49,7 +49,7 @@ ccl_device void svm_node_tex_voronoi(KernelGlobals *kg, ShaderData *sd, float *s
float3 co = stack_load_float3(stack, co_offset);
float scale = stack_load_float_default(stack, scale_offset, node.w);
- float4 result = svm_voronoi((NodeVoronoiColoring)coloring, scale, co);
+ float4 result = svm_voronoi((NodeVoronoiColoring)coloring, co*scale);
float3 color = make_float3(result.x, result.y, result.z);
float f = result.w;