Add Fractal Voronoi Noise V.2 #106827

Merged
Jacques Lucke merged 77 commits from Hoshinova/blender:add-fractal-voronoi into main 2023-06-13 09:18:18 +02:00
3 changed files with 462 additions and 523 deletions
Showing only changes of commit 7df52ac2d9 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -1245,11 +1245,9 @@ void VoronoiTextureNode::compile(SVMCompiler &compiler)
lacunarity_stack_offset,
smoothness_stack_offset,
exponent_stack_offset),
compiler.encode_uchar4(randomness_stack_offset,
distance_stack_offset,
color_stack_offset,
position_stack_offset),
compiler.encode_uchar4(w_out_stack_offset, radius_stack_offset, normalize));
compiler.encode_uchar4(
randomness_stack_offset, normalize, distance_stack_offset, color_stack_offset),
compiler.encode_uchar4(position_stack_offset, w_out_stack_offset, radius_stack_offset));
compiler.add_node(
__float_as_int(w), __float_as_int(scale), __float_as_int(detail), __float_as_int(roughness));

View File

@ -207,6 +207,26 @@ ccl_device_inline float2 floor(const float2 a)
return make_float2(floorf(a.x), floorf(a.y));
}
ccl_device_inline float reduce_add(const float2 a)
{
return a.x + a.y;
}
ccl_device_inline float reduce_min(const float2 a)
{
return min(a.x, a.y);
}
ccl_device_inline float reduce_max(const float2 a)
{
return max(a.x, a.y);
}
ccl_device_inline float2 pow(float2 v, float e)
{
return make_float2(powf(v.x, e), powf(v.y, e));
}
#endif /* !__KERNEL_METAL__ */
ccl_device_inline float2 safe_divide_float2_float(const float2 a, const float b)