|
Blender V5.0
|
Go to the source code of this file.
Macros | |
| #define | IMPULSES_COUNT 8 |
Functions | |
| ccl_device float2 | compute_2d_gabor_kernel (const float2 position, const float frequency, const float orientation) |
| ccl_device float | compute_2d_gabor_standard_deviation () |
| ccl_device float2 | compute_2d_gabor_noise_cell (float2 cell, const float2 position, const float frequency, const float isotropy, const float base_orientation) |
| ccl_device float2 | compute_2d_gabor_noise (const float2 coordinates, const float frequency, const float isotropy, const float base_orientation) |
| ccl_device float2 | compute_3d_gabor_kernel (const float3 position, const float frequency, const float3 orientation) |
| ccl_device float | compute_3d_gabor_standard_deviation () |
| ccl_device float3 | compute_3d_orientation (const float3 orientation, const float isotropy, const float4 seed) |
| ccl_device float2 | compute_3d_gabor_noise_cell (float3 cell, const float3 position, const float frequency, const float isotropy, const float3 base_orientation) |
| ccl_device float2 | compute_3d_gabor_noise (const float3 coordinates, const float frequency, const float isotropy, const float3 base_orientation) |
| ccl_device_noinline int | svm_node_tex_gabor (KernelGlobals kg, ccl_private float *stack, const uint type, const uint stack_offsets_1, const uint stack_offsets_2, int offset) |
| #define IMPULSES_COUNT 8 |
Definition at line 35 of file gabor.h.
Referenced by compute_2d_gabor_noise_cell(), compute_2d_gabor_standard_deviation(), compute_3d_gabor_noise_cell(), and compute_3d_gabor_standard_deviation().
| ccl_device float2 compute_2d_gabor_kernel | ( | const float2 | position, |
| const float | frequency, | ||
| const float | orientation ) |
Definition at line 62 of file gabor.h.
References angle(), ccl_device, cosf, dot(), expf, M_PI_F, and polar_to_cartesian().
Referenced by compute_2d_gabor_noise_cell().
| ccl_device float2 compute_2d_gabor_noise | ( | const float2 | coordinates, |
| const float | frequency, | ||
| const float | isotropy, | ||
| const float | base_orientation ) |
Definition at line 165 of file gabor.h.
References ccl_device, compute_2d_gabor_noise_cell(), floor, i, make_float2, and sum().
Referenced by svm_node_tex_gabor().
| ccl_device float2 compute_2d_gabor_noise_cell | ( | float2 | cell, |
| const float2 | position, | ||
| const float | frequency, | ||
| const float | isotropy, | ||
| const float | base_orientation ) |
Definition at line 124 of file gabor.h.
References ccl_device, compute_2d_gabor_kernel(), dot(), hash_float3_to_float(), hash_float3_to_float2(), i, IMPULSES_COUNT, M_PI_F, make_float2, make_float3(), noise(), float2::x, and float2::y.
Referenced by compute_2d_gabor_noise().
| ccl_device float compute_2d_gabor_standard_deviation | ( | ) |
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 111 of file gabor.h.
References ccl_device, IMPULSES_COUNT, and sqrtf.
Referenced by svm_node_tex_gabor().
| ccl_device float2 compute_3d_gabor_kernel | ( | const float3 | position, |
| const float | frequency, | ||
| const float3 | orientation ) |
Definition at line 191 of file gabor.h.
References angle(), ccl_device, cosf, dot(), expf, M_PI_F, and polar_to_cartesian().
Referenced by compute_3d_gabor_noise_cell().
| ccl_device float2 compute_3d_gabor_noise | ( | const float3 | coordinates, |
| const float | frequency, | ||
| const float | isotropy, | ||
| const float3 | base_orientation ) |
Definition at line 280 of file gabor.h.
References ccl_device, compute_3d_gabor_noise_cell(), floor, i, make_float2, make_float3(), and sum().
Referenced by svm_node_tex_gabor().
| ccl_device float2 compute_3d_gabor_noise_cell | ( | float3 | cell, |
| const float3 | position, | ||
| const float | frequency, | ||
| const float | isotropy, | ||
| const float3 | base_orientation ) |
Definition at line 244 of file gabor.h.
References ccl_device, compute_3d_gabor_kernel(), compute_3d_orientation(), dot(), hash_float4_to_float(), hash_float4_to_float3(), i, IMPULSES_COUNT, make_float2, make_float4, and noise().
Referenced by compute_3d_gabor_noise().
| ccl_device float compute_3d_gabor_standard_deviation | ( | ) |
Definition at line 208 of file gabor.h.
References ccl_device, IMPULSES_COUNT, M_SQRT2_F, and sqrtf.
Referenced by svm_node_tex_gabor().
| ccl_device float3 compute_3d_orientation | ( | const float3 | orientation, |
| const float | isotropy, | ||
| const float4 | seed ) |
Definition at line 218 of file gabor.h.
References acosf, ccl_device, hash_float4_to_float2(), len, M_PI_F, make_float2, seed, spherical_to_direction(), float2::x, float3::x, float2::y, float3::y, and float3::z.
Referenced by compute_3d_gabor_noise_cell().
| ccl_device_noinline int svm_node_tex_gabor | ( | KernelGlobals | kg, |
| ccl_private float * | stack, | ||
| const uint | type, | ||
| const uint | stack_offsets_1, | ||
| const uint | stack_offsets_2, | ||
| int | offset ) |
Definition at line 304 of file gabor.h.
References atan2f, ccl_device_noinline, ccl_private, clamp(), compute_2d_gabor_noise(), compute_2d_gabor_standard_deviation(), compute_3d_gabor_noise(), compute_3d_gabor_standard_deviation(), len, M_PI_F, make_float2, max, NODE_GABOR_TYPE_2D, NODE_GABOR_TYPE_3D, normalize, read_node(), stack_load_float3(), stack_load_float_default(), stack_store_float(), stack_valid(), svm_unpack_node_uchar2(), svm_unpack_node_uchar3(), svm_unpack_node_uchar4(), uint4::w, float2::x, float3::x, uint4::x, float2::y, float3::y, uint4::y, and uint4::z.
Referenced by svm_eval_nodes().