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:
authorThomas Dinges <blender@dingto.org>2015-02-23 18:49:17 +0300
committerThomas Dinges <blender@dingto.org>2015-02-23 18:49:50 +0300
commit97422ea64ff0d0f017c51394a9239fc43041e2f6 (patch)
tree4bce2069f20d58362b7057273037479c47802be1 /intern
parent249f2b9ccfc26a0e1b98ad8d8da7f60701634894 (diff)
Cleanup: Simplify brick texture code a bit.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/shaders/node_brick_texture.osl5
-rw-r--r--intern/cycles/kernel/svm/svm_brick.h5
2 files changed, 2 insertions, 8 deletions
diff --git a/intern/cycles/kernel/shaders/node_brick_texture.osl b/intern/cycles/kernel/shaders/node_brick_texture.osl
index 0b4993e9832..e26e8dbff2c 100644
--- a/intern/cycles/kernel/shaders/node_brick_texture.osl
+++ b/intern/cycles/kernel/shaders/node_brick_texture.osl
@@ -87,10 +87,7 @@ shader node_brick_texture(
if (Fac != 1.0) {
float facm = 1.0 - tint;
-
- Col[0] = facm * (Color1[0]) + tint * Color2[0];
- Col[1] = facm * (Color1[1]) + tint * Color2[1];
- Col[2] = facm * (Color1[2]) + tint * Color2[2];
+ Col = facm * Color1 + tint * Color2;
}
Color = (Fac == 1.0) ? Mortar : Col;
diff --git a/intern/cycles/kernel/svm/svm_brick.h b/intern/cycles/kernel/svm/svm_brick.h
index a46392cd544..33a2a5c7598 100644
--- a/intern/cycles/kernel/svm/svm_brick.h
+++ b/intern/cycles/kernel/svm/svm_brick.h
@@ -95,10 +95,7 @@ ccl_device void svm_node_tex_brick(KernelGlobals *kg, ShaderData *sd, float *sta
if(f != 1.0f) {
float facm = 1.0f - tint;
-
- color1.x = facm * (color1.x) + tint * color2.x;
- color1.y = facm * (color1.y) + tint * color2.y;
- color1.z = facm * (color1.z) + tint * color2.z;
+ color1 = facm * color1 + tint * color2;
}
if(stack_valid(color_offset))