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>2013-06-27 03:08:18 +0400
committerThomas Dinges <blender@dingto.org>2013-06-27 03:08:18 +0400
commitce06d6d7954535a728b9889d379480e1241dfe00 (patch)
tree2c5f8c1c4f420179dc7631802bc563481bdba68d /intern
parentdc16faaaaf8803a6914095acbf602daf4cb9924b (diff)
Cycles / Brick texture:
* Avoid some unneeded int castings, they were only needed in the original Texture Nodes implementation as custom1 and custom2 were shorts.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/shaders/node_brick_texture.osl4
-rw-r--r--intern/cycles/kernel/svm/svm_brick.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/shaders/node_brick_texture.osl b/intern/cycles/kernel/shaders/node_brick_texture.osl
index 509b4f2883b..aa9742fb277 100644
--- a/intern/cycles/kernel/shaders/node_brick_texture.osl
+++ b/intern/cycles/kernel/shaders/node_brick_texture.osl
@@ -41,8 +41,8 @@ float brick(point p, float mortar_size, float bias,
rownum = (int)floor(p[1] / row_height);
if (offset_frequency && squash_frequency) {
- brick_width *= ((int)(rownum) % squash_frequency) ? 1.0 : squash_amount; /* squash */
- offset = ((int)(rownum) % offset_frequency) ? 0 : (brick_width * offset_amount); /* offset */
+ brick_width *= (rownum % squash_frequency) ? 1.0 : squash_amount; /* squash */
+ offset = (rownum % offset_frequency) ? 0.0 : (brick_width * offset_amount); /* offset */
}
bricknum = (int)floor((p[0] + offset) / brick_width);
diff --git a/intern/cycles/kernel/svm/svm_brick.h b/intern/cycles/kernel/svm/svm_brick.h
index 43dc1a2f295..c44a4740cca 100644
--- a/intern/cycles/kernel/svm/svm_brick.h
+++ b/intern/cycles/kernel/svm/svm_brick.h
@@ -41,8 +41,8 @@ __device_noinline float2 svm_brick(float3 p, float scale, float mortar_size, flo
rownum = floor_to_int(p.y / row_height);
if(offset_frequency && squash_frequency) {
- brick_width *= ((int)(rownum) % squash_frequency ) ? 1.0f : squash_amount; /* squash */
- offset = ((int)(rownum) % offset_frequency ) ? 0 : (brick_width*offset_amount); /* offset */
+ brick_width *= (rownum % squash_frequency) ? 1.0f : squash_amount; /* squash */
+ offset = (rownum % offset_frequency) ? 0.0f : (brick_width*offset_amount); /* offset */
}
bricknum = floor_to_int((p.x+offset) / brick_width);