Add Fractal Voronoi Noise V.2 #106827
File diff suppressed because it is too large
Load Diff
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue