forked from bartvdbraak/blender
Cycles / Brick texture:
* Avoid some unneeded int castings, they were only needed in the original Texture Nodes implementation as custom1 and custom2 were shorts.
This commit is contained in:
parent
dc16faaaaf
commit
ce06d6d795
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user