|
Blender V5.3
|
Go to the source code of this file.
Macros | |
| #define | IMPULSES_COUNT 8 |
| ccl_device float2 compute_2d_gabor_kernel | ( | const float2 | position, |
| const float | frequency, | ||
| const float | orientation ) |
Definition at line 63 of file gabor.h.
References angle(), ccl_device, compute_2d_gabor_kernel(), cosf, distance_squared(), dot(), expf, frequency, M_PI_F, polar_to_cartesian(), and position.
| ccl_device float2 compute_2d_gabor_noise | ( | const float2 | coordinates, |
| const float | frequency, | ||
| const float | isotropy, | ||
| const float | base_orientation ) |
Definition at line 166 of file gabor.h.
References ccl_device, compute_2d_gabor_noise(), compute_2d_gabor_noise_cell(), floor, frequency, and make_float2.
| 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 125 of file gabor.h.
References ccl_device, compute_2d_gabor_kernel(), compute_2d_gabor_noise_cell(), dot(), frequency, hash_float3_to_float(), hash_float3_to_float2(), IMPULSES_COUNT, M_PI_F, make_float2, make_float3(), noise(), position, float2::x, and float2::y.
| 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 112 of file gabor.h.
References ccl_device, compute_2d_gabor_standard_deviation(), IMPULSES_COUNT, and sqrtf.
| ccl_device float2 compute_3d_gabor_kernel | ( | const float3 | position, |
| const float | frequency, | ||
| const float3 | orientation ) |
Definition at line 192 of file gabor.h.
References angle(), ccl_device, compute_3d_gabor_kernel(), cosf, distance_squared(), dot(), expf, frequency, M_PI_F, polar_to_cartesian(), and position.
| ccl_device float2 compute_3d_gabor_noise | ( | const float3 | coordinates, |
| const float | frequency, | ||
| const float | isotropy, | ||
| const float3 | base_orientation ) |
Definition at line 281 of file gabor.h.
References ccl_device, compute_3d_gabor_noise(), compute_3d_gabor_noise_cell(), floor, frequency, make_float2, and make_float3().
| 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 245 of file gabor.h.
References ccl_device, compute_3d_gabor_kernel(), compute_3d_gabor_noise_cell(), compute_3d_orientation(), dot(), frequency, hash_float4_to_float(), hash_float4_to_float3(), IMPULSES_COUNT, make_float2, make_float4, noise(), and position.
| ccl_device float compute_3d_gabor_standard_deviation | ( | ) |
Definition at line 209 of file gabor.h.
References ccl_device, compute_3d_gabor_standard_deviation(), IMPULSES_COUNT, M_SQRT2_F, and sqrtf.
| ccl_device float3 compute_3d_orientation | ( | const float3 | orientation, |
| const float | isotropy, | ||
| const float4 | seed ) |
Definition at line 219 of file gabor.h.
References acosf, ccl_device, compute_3d_orientation(), hash_float4_to_float2(), len(), M_PI_F, make_float2, spherical_to_direction(), float2::x, float3::x, float2::y, float3::y, and float3::z.
| ccl_device_noinline void svm_node_tex_gabor | ( | ccl_private float *ccl_restrict | stack, |
| const ccl_global SVMNodeTexGabor &ccl_restrict | node ) |
Definition at line 305 of file gabor.h.
References atan2f, ccl_device_noinline, ccl_global, ccl_private, ccl_restrict, clamp(), compute_2d_gabor_noise(), compute_2d_gabor_standard_deviation(), compute_3d_gabor_noise(), compute_3d_gabor_standard_deviation(), frequency, len(), M_PI_F, make_float2, max, node, NODE_GABOR_TYPE_2D, NODE_GABOR_TYPE_3D, normalize, scale(), stack_load(), stack_load_float3(), stack_store_float(), stack_valid(), svm_node_tex_gabor(), float2::x, float3::x, float2::y, and float3::y.
Referenced by svm_eval_nodes(), and svm_node_tex_gabor().