|
|
Create a randomized hash from the given inputs. Contrary to hash functions in BLI_hash.hh these functions produce better randomness but are more expensive to compute.
|
| uint32_t | blender::noise::hash (uint32_t kx) |
| |
| uint32_t | blender::noise::hash (uint32_t kx, uint32_t ky) |
| |
| uint32_t | blender::noise::hash (uint32_t kx, uint32_t ky, uint32_t kz) |
| |
| uint32_t | blender::noise::hash (uint32_t kx, uint32_t ky, uint32_t kz, uint32_t kw) |
| |
| uint32_t | blender::noise::hash_float (float kx) |
| |
| uint32_t | blender::noise::hash_float (float2 k) |
| |
| uint32_t | blender::noise::hash_float (float3 k) |
| |
| uint32_t | blender::noise::hash_float (float4 k) |
| |
| uint32_t | blender::noise::hash_float (const float4x4 &k) |
| |
| float | blender::noise::hash_to_float (uint32_t kx) |
| |
| float | blender::noise::hash_to_float (uint32_t kx, uint32_t ky) |
| |
| float | blender::noise::hash_to_float (uint32_t kx, uint32_t ky, uint32_t kz) |
| |
| float | blender::noise::hash_to_float (uint32_t kx, uint32_t ky, uint32_t kz, uint32_t kw) |
| |
| float | blender::noise::hash_float_to_float (float k) |
| |
| float | blender::noise::hash_float_to_float (float2 k) |
| |
| float | blender::noise::hash_float_to_float (float3 k) |
| |
| float | blender::noise::hash_float_to_float (float4 k) |
| |
| float2 | blender::noise::hash_float_to_float2 (float2 k) |
| |
| float2 | blender::noise::hash_float_to_float2 (float3 k) |
| |
| float2 | blender::noise::hash_float_to_float2 (float4 k) |
| |
| float3 | blender::noise::hash_float_to_float3 (float k) |
| |
| float3 | blender::noise::hash_float_to_float3 (float2 k) |
| |
| float3 | blender::noise::hash_float_to_float3 (float3 k) |
| |
| float3 | blender::noise::hash_float_to_float3 (float4 k) |
| |
| float4 | blender::noise::hash_float_to_float4 (float4 k) |
| |
|
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.
|
| 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<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) |
| |
| 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.
|
| 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) |
| |
|
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.
|
| 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) |
| |