|
Perlin, Ken. "Improving noise." Proceedings of the 29th annual conference on Computer graphics and interactive techniques. 2002.
This implementation is functionally identical to the implementations in EEVEE, OSL, and SVM. So any changes should be applied in all relevant implementations.
|
| enum | {
blender::noise::NOISE_SHD_PERLIN_MULTIFRACTAL = 0
, blender::noise::NOISE_SHD_PERLIN_FBM = 1
, blender::noise::NOISE_SHD_PERLIN_HYBRID_MULTIFRACTAL = 2
, blender::noise::NOISE_SHD_PERLIN_RIDGED_MULTIFRACTAL = 3
,
blender::noise::NOISE_SHD_PERLIN_HETERO_TERRAIN = 4
} |
| |
| template<typename T > |
| static T | blender::noise::mix (T v0, T v1, float x) |
| |
| BLI_INLINE float | blender::noise::mix (float v0, float v1, float v2, float v3, float x, float y) |
| |
| BLI_INLINE float | blender::noise::mix (float v0, float v1, float v2, float v3, float v4, float v5, float v6, float v7, float x, float y, float z) |
| |
| BLI_INLINE float | blender::noise::mix (float v0, float v1, float v2, float v3, float v4, float v5, float v6, float v7, float v8, float v9, float v10, float v11, float v12, float v13, float v14, float v15, float x, float y, float z, float w) |
| |
| BLI_INLINE float | blender::noise::fade (float t) |
| |
| BLI_INLINE float | blender::noise::negate_if (float value, uint32_t condition) |
| |
| BLI_INLINE float | blender::noise::noise_grad (uint32_t hash, float x) |
| |
| BLI_INLINE float | blender::noise::noise_grad (uint32_t hash, float x, float y) |
| |
| BLI_INLINE float | blender::noise::noise_grad (uint32_t hash, float x, float y, float z) |
| |
| BLI_INLINE float | blender::noise::noise_grad (uint32_t hash, float x, float y, float z, float w) |
| |
| BLI_INLINE float | blender::noise::floor_fraction (float x, int &i) |
| |
| BLI_INLINE float | blender::noise::perlin_noise (float position) |
| |
| BLI_INLINE float | blender::noise::perlin_noise (float2 position) |
| |
| BLI_INLINE float | blender::noise::perlin_noise (float3 position) |
| |
| BLI_INLINE float | blender::noise::perlin_noise (float4 position) |
| |
| float | blender::noise::perlin_signed (float position) |
| |
| float | blender::noise::perlin_signed (float2 position) |
| |
| float | blender::noise::perlin_signed (float3 position) |
| |
| float | blender::noise::perlin_signed (float4 position) |
| |
| float | blender::noise::perlin (float position) |
| |
| float | blender::noise::perlin (float2 position) |
| |
| float | blender::noise::perlin (float3 position) |
| |
| float | blender::noise::perlin (float4 position) |
| |
| template<typename T > |
| float | blender::noise::perlin_fbm (T p, float detail, float roughness, float lacunarity, bool normalize) |
| |
| template float | blender::noise::perlin_fbm< float3 > (float3 p, const float detail, const float roughness, const float lacunarity, const bool normalize) |
| |
| template<typename T > |
| float | blender::noise::perlin_multi_fractal (T p, const float detail, const float roughness, const float lacunarity) |
| |
| template<typename T > |
| float | blender::noise::perlin_hetero_terrain (T p, const float detail, const float roughness, const float lacunarity, const float offset) |
| |
| template<typename T > |
| float | blender::noise::perlin_hybrid_multi_fractal (T p, const float detail, const float roughness, const float lacunarity, const float offset, const float gain) |
| |
| template<typename T > |
| float | blender::noise::perlin_ridged_multi_fractal (T p, const float detail, const float roughness, const float lacunarity, const float offset, const float gain) |
| |
| template<typename T > |
| float | blender::noise::perlin_select (T p, float detail, float roughness, float lacunarity, float offset, float gain, int type, bool normalize) |
| |
| BLI_INLINE float | blender::noise::random_float_offset (float seed) |
| |
| BLI_INLINE float2 | blender::noise::random_float2_offset (float seed) |
| |
| BLI_INLINE float3 | blender::noise::random_float3_offset (float seed) |
| |
| BLI_INLINE float4 | blender::noise::random_float4_offset (float seed) |
| |
| BLI_INLINE float | blender::noise::perlin_distortion (float position, float strength) |
| |
| BLI_INLINE float2 | blender::noise::perlin_distortion (float2 position, float strength) |
| |
| BLI_INLINE float3 | blender::noise::perlin_distortion (float3 position, float strength) |
| |
| BLI_INLINE float4 | blender::noise::perlin_distortion (float4 position, float strength) |
| |
| template<typename T > |
| float | blender::noise::perlin_fractal_distorted (T position, float detail, float roughness, float lacunarity, float offset, float gain, float distortion, int type, bool normalize) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
| 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) |
| |
|
- Note
- Ported from Cycles code.
Original code is under the MIT License, Copyright (c) 2013 Inigo Quilez.
Smooth Voronoi:
Distance To Edge based on:
With optimization to change -2..2 scan window to -1..1 for better performance, as explained in https://www.shadertoy.com/view/llG3zy.
|
| enum | { blender::noise::NOISE_SHD_VORONOI_EUCLIDEAN = 0
, blender::noise::NOISE_SHD_VORONOI_MANHATTAN = 1
, blender::noise::NOISE_SHD_VORONOI_CHEBYCHEV = 2
, blender::noise::NOISE_SHD_VORONOI_MINKOWSKI = 3
} |
| |
| enum | {
blender::noise::NOISE_SHD_VORONOI_F1 = 0
, blender::noise::NOISE_SHD_VORONOI_F2 = 1
, blender::noise::NOISE_SHD_VORONOI_SMOOTH_F1 = 2
, blender::noise::NOISE_SHD_VORONOI_DISTANCE_TO_EDGE = 3
,
blender::noise::NOISE_SHD_VORONOI_N_SPHERE_RADIUS = 4
} |
| |
| float | blender::noise::voronoi_distance (const float a, const float b) |
| |
| float | blender::noise::voronoi_distance (const float2 a, const float2 b, const VoronoiParams ¶ms) |
| |
| float | blender::noise::voronoi_distance (const float3 a, const float3 b, const VoronoiParams ¶ms) |
| |
| float | blender::noise::voronoi_distance (const float4 a, const float4 b, const VoronoiParams ¶ms) |
| |
| float4 | blender::noise::voronoi_position (const float coord) |
| |
| VoronoiOutput | blender::noise::voronoi_f1 (const VoronoiParams ¶ms, const float coord) |
| |
| VoronoiOutput | blender::noise::voronoi_smooth_f1 (const VoronoiParams ¶ms, const float coord, const bool calc_color) |
| |
| VoronoiOutput | blender::noise::voronoi_f2 (const VoronoiParams ¶ms, const float coord) |
| |
| float | blender::noise::voronoi_distance_to_edge (const VoronoiParams ¶ms, const float coord) |
| |
| float | blender::noise::voronoi_n_sphere_radius (const VoronoiParams ¶ms, const float coord) |
| |
| float4 | blender::noise::voronoi_position (const float2 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_f1 (const VoronoiParams ¶ms, const float2 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_smooth_f1 (const VoronoiParams ¶ms, const float2 coord, const bool calc_color) |
| |
| VoronoiOutput | blender::noise::voronoi_f2 (const VoronoiParams ¶ms, const float2 coord) |
| |
| float | blender::noise::voronoi_distance_to_edge (const VoronoiParams ¶ms, const float2 coord) |
| |
| float | blender::noise::voronoi_n_sphere_radius (const VoronoiParams ¶ms, const float2 coord) |
| |
| float4 | blender::noise::voronoi_position (const float3 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_f1 (const VoronoiParams ¶ms, const float3 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_smooth_f1 (const VoronoiParams ¶ms, const float3 coord, const bool calc_color) |
| |
| VoronoiOutput | blender::noise::voronoi_f2 (const VoronoiParams ¶ms, const float3 coord) |
| |
| float | blender::noise::voronoi_distance_to_edge (const VoronoiParams ¶ms, const float3 coord) |
| |
| float | blender::noise::voronoi_n_sphere_radius (const VoronoiParams ¶ms, const float3 coord) |
| |
| float4 | blender::noise::voronoi_position (const float4 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_f1 (const VoronoiParams ¶ms, const float4 coord) |
| |
| VoronoiOutput | blender::noise::voronoi_smooth_f1 (const VoronoiParams ¶ms, const float4 coord, const bool calc_color) |
| |
| VoronoiOutput | blender::noise::voronoi_f2 (const VoronoiParams ¶ms, const float4 coord) |
| |
| float | blender::noise::voronoi_distance_to_edge (const VoronoiParams ¶ms, const float4 coord) |
| |
| float | blender::noise::voronoi_n_sphere_radius (const VoronoiParams ¶ms, const float4 coord) |
| |
| template<typename T > |
| VoronoiOutput | blender::noise::fractal_voronoi_x_fx (const VoronoiParams ¶ms, const T coord, const bool calc_color) |
| |
| template<typename T > |
| float | blender::noise::fractal_voronoi_distance_to_edge (const VoronoiParams ¶ms, const T coord) |
| |
| template VoronoiOutput | blender::noise::fractal_voronoi_x_fx< float > (const VoronoiParams ¶ms, const float coord, const bool calc_color) |
| |
| template VoronoiOutput | blender::noise::fractal_voronoi_x_fx< float2 > (const VoronoiParams ¶ms, const float2 coord, const bool calc_color) |
| |
| template VoronoiOutput | blender::noise::fractal_voronoi_x_fx< float3 > (const VoronoiParams ¶ms, const float3 coord, const bool calc_color) |
| |
| template VoronoiOutput | blender::noise::fractal_voronoi_x_fx< float4 > (const VoronoiParams ¶ms, const float4 coord, const bool calc_color) |
| |
| template float | blender::noise::fractal_voronoi_distance_to_edge< float > (const VoronoiParams ¶ms, const float coord) |
| |
| template float | blender::noise::fractal_voronoi_distance_to_edge< float2 > (const VoronoiParams ¶ms, const float2 coord) |
| |
| template float | blender::noise::fractal_voronoi_distance_to_edge< float3 > (const VoronoiParams ¶ms, const float3 coord) |
| |
| template float | blender::noise::fractal_voronoi_distance_to_edge< float4 > (const VoronoiParams ¶ms, const float4 coord) |
| |
|
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 | blender::noise::gabor_impulses_count = 8 |
| |
| static float2 | blender::noise::compute_2d_gabor_kernel (const float2 position, const float frequency, const float orientation) |
| |
| static float | blender::noise::compute_2d_gabor_standard_deviation () |
| |
| static float2 | blender::noise::compute_2d_gabor_noise_cell (const float2 cell, const float2 position, const float frequency, const float isotropy, const float base_orientation) |
| |
| static float2 | blender::noise::compute_2d_gabor_noise (const float2 coordinates, const float frequency, const float isotropy, const float base_orientation) |
| |
| static float2 | blender::noise::compute_3d_gabor_kernel (const float3 position, const float frequency, const float3 orientation) |
| |
| static float | blender::noise::compute_3d_gabor_standard_deviation () |
| |
| static float3 | blender::noise::compute_3d_orientation (const float3 orientation, const float isotropy, const float4 seed) |
| |
| static float2 | blender::noise::compute_3d_gabor_noise_cell (const float3 cell, const float3 position, const float frequency, const float isotropy, const float3 base_orientation) |
| |
| static float2 | blender::noise::compute_3d_gabor_noise (const float3 coordinates, const float frequency, const float isotropy, const float3 base_orientation) |
| |
| 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) |
| |
| 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) |
| |