|
Blender V5.0
|
Classes | |
| struct | VoronoiParams |
| struct | VoronoiOutput |
Gabor Noise | |
Implements Gabor noise based on the paper: Lagae, Ares, et al. "Procedural noise using sparse Gabor convolution." ACM Transactions on Graphics (TOG) 28.3 (2009): 1-10. But with the improvements from the paper: Tavernier, Vincent, et al. "Making gabor noise fast and normalized." Eurographics 2019-40th Annual Conference of the European Association for Computer Graphics. 2019. And compute the Phase and Intensity of the Gabor based on the paper: Tricard, Thibault, et al. "Procedural phasor noise." ACM Transactions on Graphics (TOG) 38.4 (2019): 1-13. | |
| static constexpr int | gabor_impulses_count = 8 |
| void | gabor (const float2 coordinates, const float scale, const float frequency, const float anisotropy, const float orientation, float *r_value, float *r_phase, float *r_intensity) |
| void | gabor (const float3 coordinates, const float scale, const float frequency, const float anisotropy, const float3 orientation, float *r_value, float *r_phase, float *r_intensity) |
| static float2 | compute_2d_gabor_kernel (const float2 position, const float frequency, const float orientation) |
| static float | compute_2d_gabor_standard_deviation () |
| static float2 | compute_2d_gabor_noise_cell (const float2 cell, const float2 position, const float frequency, const float isotropy, const float base_orientation) |
| static float2 | compute_2d_gabor_noise (const float2 coordinates, const float frequency, const float isotropy, const float base_orientation) |
| static float2 | compute_3d_gabor_kernel (const float3 position, const float frequency, const float3 orientation) |
| static float | compute_3d_gabor_standard_deviation () |
| static float3 | compute_3d_orientation (const float3 orientation, const float isotropy, const float4 seed) |
| static float2 | compute_3d_gabor_noise_cell (const float3 cell, const float3 position, const float frequency, const float isotropy, const float3 base_orientation) |
| static float2 | compute_3d_gabor_noise (const float3 coordinates, const float frequency, const float isotropy, const float3 base_orientation) |
| anonymous enum |
| anonymous enum |
| anonymous enum |
|
static |
Definition at line 2256 of file noise.cc.
References angle(), blender::math::cos(), cos, blender::math::dot(), blender::math::exp(), blender::math::length_squared(), blender::math::numbers::pi, blender::math::sin(), and sin.
Referenced by compute_2d_gabor_noise_cell().
|
static |
Definition at line 2362 of file noise.cc.
References compute_2d_gabor_noise_cell(), blender::math::floor(), i, and sum().
Referenced by gabor().
|
static |
Definition at line 2320 of file noise.cc.
References compute_2d_gabor_kernel(), gabor_impulses_count, hash_float_to_float(), hash_float_to_float2(), i, blender::math::length_squared(), and blender::math::numbers::pi.
Referenced by compute_2d_gabor_noise().
|
static |
Computes the approximate standard deviation of the zero mean normal distribution representing the amplitude distribution of the noise based on Equation (9) in the original Gabor noise paper. For simplicity, the Hann window is ignored and the orientation is fixed since the variance is orientation invariant. We start integrating the squared Gabor kernel with respect to x:
Which gives:
Then we similarly integrate with respect to y to get:
Secondly, we note that the second moment of the weights distribution is 0.5 since it is a fair Bernoulli distribution. So the final standard deviation expression is square root the integral multiplied by the impulse density multiplied by the second moment.
Note however that the integral is almost constant for all frequencies larger than one, and converges to an upper limit as the frequency approaches infinity, so we replace the expression with the following limit:
To get an approximation of 0.25.
Definition at line 2307 of file noise.cc.
References gabor_impulses_count, and blender::math::sqrt().
Referenced by gabor().
|
static |
Definition at line 2388 of file noise.cc.
References angle(), blender::math::cos(), blender::math::dot(), blender::math::exp(), blender::math::length_squared(), blender::math::numbers::pi, and blender::math::sin().
Referenced by compute_3d_gabor_noise_cell().
|
static |
Definition at line 2481 of file noise.cc.
References compute_3d_gabor_noise_cell(), blender::math::floor(), i, and sum().
Referenced by gabor().
|
static |
Definition at line 2445 of file noise.cc.
References compute_3d_gabor_kernel(), compute_3d_orientation(), gabor_impulses_count, hash_float_to_float(), hash_float_to_float3(), i, and blender::math::length_squared().
Referenced by compute_3d_gabor_noise().
|
static |
Definition at line 2407 of file noise.cc.
References gabor_impulses_count, blender::math::sqrt(), and blender::math::numbers::sqrt2.
Referenced by gabor().
|
static |
Definition at line 2417 of file noise.cc.
References blender::math::acos(), blender::math::cos(), hash_float_to_float2(), blender::math::length(), blender::math::numbers::pi, seed, blender::math::sign(), and blender::math::sin().
Referenced by compute_3d_gabor_noise_cell().
| BLI_INLINE float blender::noise::fade | ( | float | t | ) |
Definition at line 462 of file noise.cc.
References BLI_INLINE.
Referenced by perlin_noise(), perlin_noise(), perlin_noise(), and perlin_noise().
| BLI_INLINE uint32_t blender::noise::float_as_uint | ( | float | f | ) |
Definition at line 142 of file noise.cc.
References BLI_INLINE, and i.
Referenced by hash_float(), hash_float(), hash_float(), and hash_float().
| BLI_INLINE float blender::noise::floor_fraction | ( | float | x, |
| int & | i ) |
Definition at line 505 of file noise.cc.
References BLI_INLINE, blender::math::floor(), i, and x.
Referenced by perlin_noise(), perlin_noise(), perlin_noise(), and perlin_noise().
| float blender::noise::fractal_voronoi_distance_to_edge | ( | const VoronoiParams & | params, |
| const T | coord ) |
Definition at line 2137 of file noise.cc.
References ceilf, distance(), floorf, i, blender::math::min(), mix, params, T, and voronoi_distance_to_edge().
| template float blender::noise::fractal_voronoi_distance_to_edge< float > | ( | const VoronoiParams & | params, |
| const float | coord ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::call().
| template float blender::noise::fractal_voronoi_distance_to_edge< float2 > | ( | const VoronoiParams & | params, |
| const float2 | coord ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::call().
| template float blender::noise::fractal_voronoi_distance_to_edge< float3 > | ( | const VoronoiParams & | params, |
| const float3 | coord ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::call().
| template float blender::noise::fractal_voronoi_distance_to_edge< float4 > | ( | const VoronoiParams & | params, |
| const float4 | coord ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::call().
| VoronoiOutput blender::noise::fractal_voronoi_x_fx | ( | const VoronoiParams & | params, |
| const T | coord, | ||
| const bool | calc_color ) |
Definition at line 2078 of file noise.cc.
References ceilf, blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, floorf, i, mix(), mix, NOISE_SHD_VORONOI_F2, NOISE_SHD_VORONOI_SMOOTH_F1, output, params, blender::noise::VoronoiOutput::position, T, voronoi_f1(), voronoi_f2(), and voronoi_smooth_f1().
| template VoronoiOutput blender::noise::fractal_voronoi_x_fx< float > | ( | const VoronoiParams & | params, |
| const float | coord, | ||
| const bool | calc_color ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call().
| template VoronoiOutput blender::noise::fractal_voronoi_x_fx< float2 > | ( | const VoronoiParams & | params, |
| const float2 | coord, | ||
| const bool | calc_color ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call().
| template VoronoiOutput blender::noise::fractal_voronoi_x_fx< float3 > | ( | const VoronoiParams & | params, |
| const float3 | coord, | ||
| const bool | calc_color ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call().
| template VoronoiOutput blender::noise::fractal_voronoi_x_fx< float4 > | ( | const VoronoiParams & | params, |
| const float4 | coord, | ||
| const bool | calc_color ) |
References params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call().
| void blender::noise::gabor | ( | const float2 | coordinates, |
| const float | scale, | ||
| const float | frequency, | ||
| const float | anisotropy, | ||
| const float | orientation, | ||
| float * | r_value, | ||
| float * | r_phase, | ||
| float * | r_intensity ) |
Definition at line 2505 of file noise.cc.
References blender::math::atan2(), blender::math::clamp(), compute_2d_gabor_noise(), compute_2d_gabor_standard_deviation(), blender::math::length(), blender::math::max(), and blender::math::numbers::pi.
Referenced by blender::nodes::node_shader_tex_gabor_cc::GaborNoiseFunction::call().
| void blender::noise::gabor | ( | const float3 | coordinates, |
| const float | scale, | ||
| const float | frequency, | ||
| const float | anisotropy, | ||
| const float3 | orientation, | ||
| float * | r_value, | ||
| float * | r_phase, | ||
| float * | r_intensity ) |
Definition at line 2544 of file noise.cc.
References blender::math::atan2(), blender::math::clamp(), compute_3d_gabor_noise(), compute_3d_gabor_standard_deviation(), blender::math::length(), blender::math::max(), blender::math::normalize(), and blender::math::numbers::pi.
| uint32_t blender::noise::hash | ( | uint32_t | kx | ) |
Definition at line 90 of file noise.cc.
References b, and hash_bit_final().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::copy_hashed_ids(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_edges(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_faces(), blender::geometry::gather_realize_tasks_for_instances(), blender::nodes::node_fn_hash_value_cc::get_multi_function(), blender::nodes::node_fn_random_value_cc::node_build_multi_function(), noise_grad(), noise_grad(), noise_grad(), noise_grad(), and blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface().
| uint32_t blender::noise::hash | ( | uint32_t | kx, |
| uint32_t | ky ) |
Definition at line 101 of file noise.cc.
References b, and hash_bit_final().
| uint32_t blender::noise::hash | ( | uint32_t | kx, |
| uint32_t | ky, | ||
| uint32_t | kz ) |
Definition at line 113 of file noise.cc.
References b, and hash_bit_final().
| uint32_t blender::noise::hash | ( | uint32_t | kx, |
| uint32_t | ky, | ||
| uint32_t | kz, | ||
| uint32_t | kw ) |
Definition at line 126 of file noise.cc.
References b, hash_bit_final(), and hash_bit_mix().
| BLI_INLINE void blender::noise::hash_bit_final | ( | uint32_t & | a, |
| uint32_t & | b, | ||
| uint32_t & | c ) |
Definition at line 72 of file noise.cc.
References b, BLI_INLINE, and hash_bit_rotate().
| BLI_INLINE void blender::noise::hash_bit_mix | ( | uint32_t & | a, |
| uint32_t & | b, | ||
| uint32_t & | c ) |
Definition at line 50 of file noise.cc.
References b, BLI_INLINE, and hash_bit_rotate().
Referenced by hash().
| BLI_INLINE uint32_t blender::noise::hash_bit_rotate | ( | uint32_t | x, |
| uint32_t | k ) |
Definition at line 45 of file noise.cc.
References BLI_INLINE, and x.
Referenced by hash_bit_final(), and hash_bit_mix().
| uint32_t blender::noise::hash_float | ( | const float4x4 & | k | ) |
Definition at line 221 of file noise.cc.
References hash, and hash_float().
| uint32_t blender::noise::hash_float | ( | float | kx | ) |
Definition at line 201 of file noise.cc.
References float_as_uint(), and hash.
Referenced by blender::nodes::node_fn_hash_value_cc::get_multi_function(), hash_float(), hash_float_to_float(), hash_float_to_float(), hash_float_to_float(), and hash_float_to_float().
| uint32_t blender::noise::hash_float | ( | float2 | k | ) |
Definition at line 206 of file noise.cc.
References float_as_uint(), and hash.
| uint32_t blender::noise::hash_float | ( | float3 | k | ) |
Definition at line 211 of file noise.cc.
References float_as_uint(), and hash.
| uint32_t blender::noise::hash_float | ( | float4 | k | ) |
Definition at line 216 of file noise.cc.
References float_as_uint(), and hash.
Definition at line 255 of file noise.cc.
References hash_float(), and uint_to_float_01().
Referenced by blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction::call(), compute_2d_gabor_noise_cell(), compute_3d_gabor_noise_cell(), hash_float_to_float2(), hash_float_to_float2(), hash_float_to_float2(), hash_float_to_float3(), hash_float_to_float3(), hash_float_to_float3(), hash_float_to_float3(), hash_float_to_float4(), random_float2_offset(), random_float3_offset(), random_float4_offset(), random_float_offset(), blender::nodes::node_geo_distribute_points_on_faces_cc::update_elimination_mask_based_on_density_factors(), voronoi_distance_to_edge(), voronoi_f1(), voronoi_f2(), voronoi_n_sphere_radius(), and voronoi_smooth_f1().
Definition at line 260 of file noise.cc.
References hash_float(), and uint_to_float_01().
Definition at line 265 of file noise.cc.
References hash_float(), and uint_to_float_01().
Definition at line 270 of file noise.cc.
References hash_float(), and uint_to_float_01().
Definition at line 275 of file noise.cc.
References hash_float_to_float().
Referenced by compute_2d_gabor_noise_cell(), and compute_3d_orientation().
Definition at line 280 of file noise.cc.
References hash_float_to_float().
Definition at line 286 of file noise.cc.
References hash_float_to_float().
Definition at line 292 of file noise.cc.
References hash_float_to_float().
Referenced by blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction::call(), compute_3d_gabor_noise_cell(), voronoi_f1(), voronoi_f2(), and voronoi_smooth_f1().
Definition at line 299 of file noise.cc.
References hash_float_to_float().
Definition at line 306 of file noise.cc.
References hash_float_to_float().
Definition at line 313 of file noise.cc.
References hash_float_to_float().
Definition at line 320 of file noise.cc.
References hash_float_to_float().
Definition at line 335 of file noise.cc.
References hash_pcg2d_i(), and int_to_float_01().
Referenced by voronoi_distance_to_edge(), voronoi_f1(), voronoi_f2(), voronoi_n_sphere_radius(), and voronoi_smooth_f1().
Definition at line 354 of file noise.cc.
References hash_int3_to_float3().
Referenced by voronoi_f1(), voronoi_f2(), and voronoi_smooth_f1().
Definition at line 341 of file noise.cc.
References hash_pcg3d_i(), and int_to_float_01().
Referenced by hash_int2_to_float3(), voronoi_distance_to_edge(), voronoi_f1(), voronoi_f2(), voronoi_n_sphere_radius(), and voronoi_smooth_f1().
Definition at line 359 of file noise.cc.
References hash_int4_to_float4(), and blender::VecBase< T, Size >::xyz().
Referenced by voronoi_f1(), voronoi_f2(), and voronoi_smooth_f1().
Definition at line 347 of file noise.cc.
References hash_pcg4d_i(), and int_to_float_01().
Referenced by hash_int4_to_float3(), voronoi_distance_to_edge(), voronoi_f1(), voronoi_f2(), voronoi_n_sphere_radius(), and voronoi_smooth_f1().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| float blender::noise::hash_to_float | ( | uint32_t | kx | ) |
Definition at line 233 of file noise.cc.
References hash, and uint_to_float_01().
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams_cpu(), blender::nodes::node_composite_lensdist_cc::get_jitter(), and blender::nodes::node_fn_random_value_cc::node_build_multi_function().
| float blender::noise::hash_to_float | ( | uint32_t | kx, |
| uint32_t | ky ) |
Definition at line 238 of file noise.cc.
References hash, and uint_to_float_01().
| float blender::noise::hash_to_float | ( | uint32_t | kx, |
| uint32_t | ky, | ||
| uint32_t | kz ) |
Definition at line 243 of file noise.cc.
References hash, and uint_to_float_01().
| float blender::noise::hash_to_float | ( | uint32_t | kx, |
| uint32_t | ky, | ||
| uint32_t | kz, | ||
| uint32_t | kw ) |
Definition at line 248 of file noise.cc.
References hash, and uint_to_float_01().
Definition at line 330 of file noise.cc.
References float.
Referenced by hash_int2_to_float2(), hash_int3_to_float3(), and hash_int4_to_float4().
| BLI_INLINE float blender::noise::negate_if | ( | float | value, |
| uint32_t | condition ) |
Definition at line 467 of file noise.cc.
References BLI_INLINE.
Referenced by noise_grad(), noise_grad(), noise_grad(), and noise_grad().
| BLI_INLINE float blender::noise::noise_grad | ( | uint32_t | hash, |
| float | x ) |
Definition at line 472 of file noise.cc.
References BLI_INLINE, hash(), negate_if(), and x.
Referenced by perlin_noise(), perlin_noise(), perlin_noise(), and perlin_noise().
| BLI_INLINE float blender::noise::noise_grad | ( | uint32_t | hash, |
| float | x, | ||
| float | y ) |
Definition at line 479 of file noise.cc.
References BLI_INLINE, hash(), negate_if(), v, x, and y.
| BLI_INLINE float blender::noise::noise_grad | ( | uint32_t | hash, |
| float | x, | ||
| float | y, | ||
| float | z ) |
Definition at line 487 of file noise.cc.
References BLI_INLINE, ELEM, hash(), negate_if(), v, x, y, and z().
Definition at line 496 of file noise.cc.
References BLI_INLINE, hash(), negate_if(), v, w(), x, y, and z().
Definition at line 665 of file noise.cc.
References perlin_signed().
Referenced by BKE_paint_randomize_color().
Definition at line 670 of file noise.cc.
References perlin_signed().
Definition at line 675 of file noise.cc.
References perlin_signed().
Definition at line 680 of file noise.cc.
References perlin_signed().
| BLI_INLINE float blender::noise::perlin_distortion | ( | float | position, |
| float | strength ) |
Definition at line 918 of file noise.cc.
References BLI_INLINE, perlin_signed(), and random_float_offset().
Referenced by perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), and perlin_fractal_distorted().
| BLI_INLINE float2 blender::noise::perlin_distortion | ( | float2 | position, |
| float | strength ) |
Definition at line 923 of file noise.cc.
References BLI_INLINE, perlin_signed(), and random_float2_offset().
| BLI_INLINE float3 blender::noise::perlin_distortion | ( | float3 | position, |
| float | strength ) |
Definition at line 929 of file noise.cc.
References BLI_INLINE, perlin_signed(), and random_float3_offset().
| BLI_INLINE float4 blender::noise::perlin_distortion | ( | float4 | position, |
| float | strength ) |
Definition at line 936 of file noise.cc.
References BLI_INLINE, perlin_signed(), and random_float4_offset().
| float blender::noise::perlin_fbm | ( | T | p, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| bool | normalize ) |
Definition at line 696 of file noise.cc.
References i, mix, normalize, perlin_signed(), sum(), and T.
Referenced by fcm_noise_evaluate(), and perlin_select().
| template float blender::noise::perlin_fbm< float2 > | ( | float2 | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity, | ||
| const bool | normalize ) |
References normalize.
| template float blender::noise::perlin_fbm< float3 > | ( | float3 | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity, | ||
| const bool | normalize ) |
References normalize.
Referenced by blender::nodes::node_shader_tex_wave_cc::WaveFunction::call().
| float3 blender::noise::perlin_float3_fractal_distorted | ( | float | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 1001 of file noise.cc.
References normalize, perlin_distortion(), perlin_select(), and random_float_offset().
Referenced by blender::nodes::node_shader_tex_noise_cc::NoiseFunction::call().
| float3 blender::noise::perlin_float3_fractal_distorted | ( | float2 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 1032 of file noise.cc.
References normalize, perlin_distortion(), perlin_select(), and random_float2_offset().
| float3 blender::noise::perlin_float3_fractal_distorted | ( | float3 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 1063 of file noise.cc.
References normalize, perlin_distortion(), perlin_select(), and random_float3_offset().
| float3 blender::noise::perlin_float3_fractal_distorted | ( | float4 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 1094 of file noise.cc.
References normalize, perlin_distortion(), perlin_select(), and random_float4_offset().
| float blender::noise::perlin_fractal_distorted | ( | T | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 947 of file noise.cc.
References normalize, perlin_distortion(), perlin_select(), and T.
Referenced by blender::nodes::node_shader_tex_noise_cc::NoiseFunction::call().
| template float blender::noise::perlin_fractal_distorted< float > | ( | float | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
References normalize.
| template float blender::noise::perlin_fractal_distorted< float2 > | ( | float2 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
References normalize.
| template float blender::noise::perlin_fractal_distorted< float3 > | ( | float3 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
References normalize.
| template float blender::noise::perlin_fractal_distorted< float4 > | ( | float4 | position, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| float | distortion, | ||
| int | type, | ||
| bool | normalize ) |
References normalize.
| float blender::noise::perlin_hetero_terrain | ( | T | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity, | ||
| const float | offset ) |
Definition at line 758 of file noise.cc.
References floorf, i, perlin_signed(), and T.
Referenced by perlin_select().
| float blender::noise::perlin_hybrid_multi_fractal | ( | T | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity, | ||
| const float | offset, | ||
| const float | gain ) |
Definition at line 784 of file noise.cc.
References floorf, i, perlin_signed(), and T.
Referenced by perlin_select().
| float blender::noise::perlin_multi_fractal | ( | T | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity ) |
Definition at line 738 of file noise.cc.
References floorf, i, perlin_signed(), and T.
Referenced by perlin_select().
| BLI_INLINE float blender::noise::perlin_noise | ( | float | position | ) |
Definition at line 512 of file noise.cc.
References BLI_INLINE, fade(), floor_fraction(), hash, mix, noise_grad(), and X.
Referenced by perlin_signed(), perlin_signed(), perlin_signed(), and perlin_signed().
| BLI_INLINE float blender::noise::perlin_noise | ( | float2 | position | ) |
Definition at line 525 of file noise.cc.
References BLI_INLINE, fade(), floor_fraction(), hash, mix, noise_grad(), v, X, and Y.
| BLI_INLINE float blender::noise::perlin_noise | ( | float3 | position | ) |
Definition at line 545 of file noise.cc.
References BLI_INLINE, fade(), floor_fraction(), hash, mix, noise_grad(), v, w(), X, Y, and Z.
| BLI_INLINE float blender::noise::perlin_noise | ( | float4 | position | ) |
Definition at line 572 of file noise.cc.
References BLI_INLINE, fade(), floor_fraction(), hash, mix, noise_grad(), v, W, X, Y, and Z.
| float blender::noise::perlin_ridged_multi_fractal | ( | T | p, |
| const float | detail, | ||
| const float | roughness, | ||
| const float | lacunarity, | ||
| const float | offset, | ||
| const float | gain ) |
Definition at line 816 of file noise.cc.
References i, perlin_signed(), and T.
Referenced by perlin_select().
| float blender::noise::perlin_select | ( | T | p, |
| float | detail, | ||
| float | roughness, | ||
| float | lacunarity, | ||
| float | offset, | ||
| float | gain, | ||
| int | type, | ||
| bool | normalize ) |
Definition at line 852 of file noise.cc.
References NOISE_SHD_PERLIN_FBM, NOISE_SHD_PERLIN_HETERO_TERRAIN, NOISE_SHD_PERLIN_HYBRID_MULTIFRACTAL, NOISE_SHD_PERLIN_MULTIFRACTAL, NOISE_SHD_PERLIN_RIDGED_MULTIFRACTAL, normalize, perlin_fbm(), perlin_hetero_terrain(), perlin_hybrid_multi_fractal(), perlin_multi_fractal(), perlin_ridged_multi_fractal(), and T.
Referenced by perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), perlin_float3_fractal_distorted(), and perlin_fractal_distorted().
Definition at line 614 of file noise.cc.
References blender::math::abs(), float, blender::math::mod(), and perlin_noise().
Referenced by perlin(), perlin(), perlin(), perlin(), perlin_distortion(), perlin_distortion(), perlin_distortion(), perlin_distortion(), perlin_fbm(), perlin_hetero_terrain(), perlin_hybrid_multi_fractal(), perlin_multi_fractal(), perlin_ridged_multi_fractal(), blender::ed::greasepencil::randomize_opacity(), blender::ed::greasepencil::randomize_radius(), and blender::ed::greasepencil::randomize_rotation().
Definition at line 624 of file noise.cc.
References blender::math::abs(), blender::math::mod(), and perlin_noise().
Definition at line 636 of file noise.cc.
References blender::math::abs(), blender::math::mod(), and perlin_noise().
Definition at line 649 of file noise.cc.
References blender::math::abs(), blender::math::mod(), and perlin_noise().
| BLI_INLINE float2 blender::noise::random_float2_offset | ( | float | seed | ) |
Definition at line 895 of file noise.cc.
References BLI_INLINE, hash_float_to_float(), and seed.
Referenced by perlin_distortion(), and perlin_float3_fractal_distorted().
| BLI_INLINE float3 blender::noise::random_float3_offset | ( | float | seed | ) |
Definition at line 901 of file noise.cc.
References BLI_INLINE, hash_float_to_float(), and seed.
Referenced by perlin_distortion(), and perlin_float3_fractal_distorted().
| BLI_INLINE float4 blender::noise::random_float4_offset | ( | float | seed | ) |
Definition at line 908 of file noise.cc.
References BLI_INLINE, hash_float_to_float(), and seed.
Referenced by perlin_distortion(), and perlin_float3_fractal_distorted().
| BLI_INLINE float blender::noise::random_float_offset | ( | float | seed | ) |
Definition at line 890 of file noise.cc.
References BLI_INLINE, hash_float_to_float(), and seed.
Referenced by perlin_distortion(), and perlin_float3_fractal_distorted().
| BLI_INLINE float blender::noise::uint_to_float_01 | ( | uint32_t | k | ) |
Definition at line 228 of file noise.cc.
References BLI_INLINE, and float.
Referenced by hash_float_to_float(), hash_float_to_float(), hash_float_to_float(), hash_float_to_float(), hash_to_float(), hash_to_float(), hash_to_float(), and hash_to_float().
Definition at line 1166 of file noise.cc.
References b.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call(), voronoi_distance_bound(), voronoi_f1(), voronoi_f1(), voronoi_f1(), voronoi_f1(), voronoi_f2(), voronoi_f2(), voronoi_f2(), voronoi_f2(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), and voronoi_smooth_f1().
| float blender::noise::voronoi_distance | ( | const float2 | a, |
| const float2 | b, | ||
| const VoronoiParams & | params ) |
Definition at line 1171 of file noise.cc.
References b, BLI_assert_unreachable, blender::math::distance(), NOISE_SHD_VORONOI_CHEBYCHEV, NOISE_SHD_VORONOI_EUCLIDEAN, NOISE_SHD_VORONOI_MANHATTAN, NOISE_SHD_VORONOI_MINKOWSKI, and params.
| float blender::noise::voronoi_distance | ( | const float3 | a, |
| const float3 | b, | ||
| const VoronoiParams & | params ) |
Definition at line 1191 of file noise.cc.
References b, BLI_assert_unreachable, blender::math::distance(), NOISE_SHD_VORONOI_CHEBYCHEV, NOISE_SHD_VORONOI_EUCLIDEAN, NOISE_SHD_VORONOI_MANHATTAN, NOISE_SHD_VORONOI_MINKOWSKI, and params.
| float blender::noise::voronoi_distance | ( | const float4 | a, |
| const float4 | b, | ||
| const VoronoiParams & | params ) |
Definition at line 1212 of file noise.cc.
References b, BLI_assert_unreachable, blender::math::distance(), NOISE_SHD_VORONOI_CHEBYCHEV, NOISE_SHD_VORONOI_EUCLIDEAN, NOISE_SHD_VORONOI_MANHATTAN, NOISE_SHD_VORONOI_MINKOWSKI, and params.
|
static |
Definition at line 1238 of file noise.cc.
References b, blender::math::length_squared(), NOISE_SHD_VORONOI_EUCLIDEAN, params, T, and voronoi_distance().
Referenced by voronoi_f1(), voronoi_f1(), and voronoi_f1().
| float blender::noise::voronoi_distance_to_edge | ( | const VoronoiParams & | params, |
| const float | coord ) |
Definition at line 1356 of file noise.cc.
References fabsf, floorf, hash_float_to_float(), blender::math::min(), and params.
Referenced by fractal_voronoi_distance_to_edge().
| float blender::noise::voronoi_distance_to_edge | ( | const VoronoiParams & | params, |
| const float2 | coord ) |
Definition at line 1529 of file noise.cc.
References blender::math::dot(), blender::math::floor(), FLT_MAX, hash_int2_to_float2(), i, blender::math::min(), blender::math::normalize(), and params.
| float blender::noise::voronoi_distance_to_edge | ( | const VoronoiParams & | params, |
| const float3 | coord ) |
Definition at line 1740 of file noise.cc.
References blender::math::dot(), blender::math::floor(), FLT_MAX, hash_int3_to_float3(), i, blender::math::min(), blender::math::normalize(), and params.
| float blender::noise::voronoi_distance_to_edge | ( | const VoronoiParams & | params, |
| const float4 | coord ) |
Definition at line 1968 of file noise.cc.
References blender::math::dot(), blender::math::floor(), FLT_MAX, hash_int4_to_float4(), i, blender::math::min(), blender::math::normalize(), and params.
| VoronoiOutput blender::noise::voronoi_f1 | ( | const VoronoiParams & | params, |
| const float | coord ) |
Definition at line 1253 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, floorf, FLT_MAX, hash_float_to_float(), hash_float_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), and voronoi_position().
Referenced by fractal_voronoi_x_fx().
| VoronoiOutput blender::noise::voronoi_f1 | ( | const VoronoiParams & | params, |
| const float2 | coord ) |
Definition at line 1416 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int2_to_float2(), hash_int2_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), voronoi_distance_bound(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_f1 | ( | const VoronoiParams & | params, |
| const float3 | coord ) |
Definition at line 1621 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int3_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), voronoi_distance_bound(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_f1 | ( | const VoronoiParams & | params, |
| const float4 | coord ) |
Definition at line 1840 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int4_to_float3(), hash_int4_to_float4(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), voronoi_distance_bound(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_f2 | ( | const VoronoiParams & | params, |
| const float | coord ) |
Definition at line 1318 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, floorf, FLT_MAX, hash_float_to_float(), hash_float_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), and voronoi_position().
Referenced by fractal_voronoi_x_fx().
| VoronoiOutput blender::noise::voronoi_f2 | ( | const VoronoiParams & | params, |
| const float2 | coord ) |
Definition at line 1488 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int2_to_float2(), hash_int2_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_f2 | ( | const VoronoiParams & | params, |
| const float3 | coord ) |
Definition at line 1697 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int3_to_float3(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_f2 | ( | const VoronoiParams & | params, |
| const float4 | coord ) |
Definition at line 1922 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), FLT_MAX, hash_int4_to_float3(), hash_int4_to_float4(), i, params, blender::noise::VoronoiOutput::position, voronoi_distance(), and voronoi_position().
| float blender::noise::voronoi_n_sphere_radius | ( | const VoronoiParams & | params, |
| const float | coord ) |
Definition at line 1370 of file noise.cc.
References fabsf, floorf, FLT_MAX, hash_float_to_float(), i, and params.
Referenced by blender::nodes::node_shader_tex_voronoi_cc::VoronoiNSphereFunction::call().
| float blender::noise::voronoi_n_sphere_radius | ( | const VoronoiParams & | params, |
| const float2 | coord ) |
Definition at line 1570 of file noise.cc.
References blender::math::distance(), blender::math::floor(), FLT_MAX, hash_int2_to_float2(), i, blender::math::length_squared(), and params.
| float blender::noise::voronoi_n_sphere_radius | ( | const VoronoiParams & | params, |
| const float3 | coord ) |
Definition at line 1785 of file noise.cc.
References blender::math::distance(), blender::math::floor(), FLT_MAX, hash_int3_to_float3(), i, blender::math::length_squared(), and params.
| float blender::noise::voronoi_n_sphere_radius | ( | const VoronoiParams & | params, |
| const float4 | coord ) |
Definition at line 2019 of file noise.cc.
References blender::math::distance(), blender::math::floor(), FLT_MAX, hash_int4_to_float4(), i, blender::math::length_squared(), and params.
Definition at line 1248 of file noise.cc.
Referenced by voronoi_f1(), voronoi_f1(), voronoi_f1(), voronoi_f1(), voronoi_f2(), voronoi_f2(), voronoi_f2(), voronoi_f2(), voronoi_smooth_f1(), voronoi_smooth_f1(), voronoi_smooth_f1(), and voronoi_smooth_f1().
| VoronoiOutput blender::noise::voronoi_smooth_f1 | ( | const VoronoiParams & | params, |
| const float | coord, | ||
| const bool | calc_color ) |
Definition at line 1280 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, floorf, hash_float_to_float(), hash_float_to_float3(), i, mix, params, blender::noise::VoronoiOutput::position, smoothstep(), voronoi_distance(), and voronoi_position().
Referenced by fractal_voronoi_x_fx().
| VoronoiOutput blender::noise::voronoi_smooth_f1 | ( | const VoronoiParams & | params, |
| const float2 | coord, | ||
| const bool | calc_color ) |
Definition at line 1446 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), hash_int2_to_float2(), hash_int2_to_float3(), i, mix, params, blender::noise::VoronoiOutput::position, smoothstep(), voronoi_distance(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_smooth_f1 | ( | const VoronoiParams & | params, |
| const float3 | coord, | ||
| const bool | calc_color ) |
Definition at line 1653 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), hash_int3_to_float3(), i, mix, params, blender::noise::VoronoiOutput::position, smoothstep(), voronoi_distance(), and voronoi_position().
| VoronoiOutput blender::noise::voronoi_smooth_f1 | ( | const VoronoiParams & | params, |
| const float4 | coord, | ||
| const bool | calc_color ) |
Definition at line 1875 of file noise.cc.
References blender::noise::VoronoiOutput::color, blender::noise::VoronoiOutput::distance, blender::math::floor(), hash_int4_to_float3(), hash_int4_to_float4(), i, mix, params, blender::noise::VoronoiOutput::position, smoothstep(), voronoi_distance(), and voronoi_position().
|
staticconstexpr |
Definition at line 2229 of file noise.cc.
Referenced by compute_2d_gabor_noise_cell(), compute_2d_gabor_standard_deviation(), compute_3d_gabor_noise_cell(), and compute_3d_gabor_standard_deviation().