Blender V2.61 - r43446
|
Go to the source code of this file.
Functions | |
CCL_NAMESPACE_BEGIN __device void | to_unit_disk (float *x, float *y) |
__device void | make_orthonormals_tangent (const float3 N, const float3 T, float3 *a, float3 *b) |
__device_inline void | sample_cos_hemisphere (const float3 N, float randu, float randv, float3 *omega_in, float *pdf) |
__device_inline void | sample_uniform_hemisphere (const float3 N, float randu, float randv, float3 *omega_in, float *pdf) |
__device float3 | sample_uniform_sphere (float u1, float u2) |
__device float | power_heuristic (float a, float b) |
__device float2 | concentric_sample_disk (float u1, float u2) |
__device float2 | regular_polygon_sample (float corners, float rotation, float u, float v) |
__device float2 | direction_to_spherical (float3 dir) |
__device float3 | spherical_to_direction (float theta, float phi) |
__device float2 concentric_sample_disk | ( | float | u1, |
float | u2 | ||
) |
Definition at line 121 of file kernel_montecarlo.h.
References cosf, M_PI_4_F, make_float2(), and sinf.
Referenced by camera_sample_aperture().
Definition at line 190 of file kernel_montecarlo.h.
References acosf, atan2f, make_float2(), float3::x, float3::y, and float3::z.
Referenced by sky_radiance().
Definition at line 70 of file kernel_montecarlo.h.
References cross().
Referenced by bsdf_ward_eval_reflect(), and bsdf_ward_sample().
__device float power_heuristic | ( | float | a, |
float | b | ||
) |
Definition at line 116 of file kernel_montecarlo.h.
Referenced by direct_emission(), and indirect_emission().
__device float2 regular_polygon_sample | ( | float | corners, |
float | rotation, | ||
float | u, | ||
float | v | ||
) |
Definition at line 164 of file kernel_montecarlo.h.
References angle(), cosf, floorf, M_PI_F, make_float2(), p, sinf, sqrtf, float2::x, and float2::y.
Referenced by camera_sample_aperture().
__device_inline void sample_cos_hemisphere | ( | const float3 | N, |
float | randu, | ||
float | randv, | ||
float3 * | omega_in, | ||
float * | |||
) |
Definition at line 76 of file kernel_montecarlo.h.
References B, M_1_PI_F, make_orthonormals(), max, N, sqrtf, T, and to_unit_disk().
Referenced by bsdf_diffuse_sample(), bsdf_translucent_sample(), bsdf_westin_sheen_sample(), WestinSheenClosure::sample(), TranslucentClosure::sample(), and DiffuseClosure::sample().
__device_inline void sample_uniform_hemisphere | ( | const float3 | N, |
float | randu, | ||
float | randv, | ||
float3 * | omega_in, | ||
float * | |||
) |
Definition at line 89 of file kernel_montecarlo.h.
References B, cosf, M_1_PI_F, M_PI_F, make_orthonormals(), max, N, sinf, sqrtf, and T.
Referenced by bsdf_ashikhmin_velvet_sample(), bsdf_oren_nayar_sample(), AshikhminVelvetClosure::sample(), and OrenNayarClosure::sample().
__device float3 sample_uniform_sphere | ( | float | u1, |
float | u2 | ||
) |
Definition at line 105 of file kernel_montecarlo.h.
References cosf, fmaxf, M_PI_F, make_float3(), sinf, and sqrtf.
__device float3 spherical_to_direction | ( | float | theta, |
float | phi | ||
) |
Definition at line 198 of file kernel_montecarlo.h.
References cosf, make_float3(), and sinf.
CCL_NAMESPACE_BEGIN __device void to_unit_disk | ( | float * | x, |
float * | y | ||
) |
Given values x and y on [0,1], convert them in place to values on [-1,1] uniformly distributed over a unit sphere. This code is derived from Peter Shirley, "Realistic Ray Tracing", p. 103.
Definition at line 41 of file kernel_montecarlo.h.
References cosf, M_PI_4_F, and sinf.
Referenced by disk_light_sample(), and sample_cos_hemisphere().