|
Blender V4.3
|
#include "kernel/light/common.h"Go to the source code of this file.
| ccl_device float spot_light_attenuation | ( | const ccl_global KernelSpotLight * | spot, |
| const float3 | ray ) |
Definition at line 22 of file spot.h.
References smoothstepf().
Referenced by spot_light_mnee_sample_update(), spot_light_sample(), and spot_light_sample_from_intersection().
| ccl_device_inline bool spot_light_intersect | ( | const ccl_global KernelLight * | klight, |
| const ccl_private Ray *ccl_restrict | ray, | ||
| ccl_private float * | t ) |
Definition at line 211 of file spot.h.
References dot(), and point_light_intersect().
Referenced by lights_intersect_impl().
| ccl_device_forceinline void spot_light_mnee_sample_update | ( | const ccl_global KernelLight * | klight, |
| ccl_private LightSample * | ls, | ||
| const float3 | P, | ||
| const float3 | N, | ||
| const uint32_t | path_flag ) |
Definition at line 166 of file spot.h.
References fabsf, len_squared(), M_PI_F, N, normalize(), normalize_len(), P, spot_light_attenuation(), spot_light_pdf(), spot_light_to_local(), spot_light_uv(), and sqr().
Referenced by light_sample_update().
| ccl_device_forceinline float spot_light_pdf | ( | const ccl_global KernelSpotLight * | spot, |
| const float | d_sq, | ||
| const float | r_sq, | ||
| const float3 | N, | ||
| const float3 | D, | ||
| const uint32_t | path_flag ) |
Definition at line 150 of file spot.h.
References min, N, PATH_RAY_MIS_HAD_TRANSMISSION, pdf_cos_hemisphere(), and sin_sqr_to_one_minus_cos().
Referenced by spot_light_mnee_sample_update(), and spot_light_sample_from_intersection().
| ccl_device_inline bool spot_light_sample | ( | const ccl_global KernelLight * | klight, |
| const float2 | rand, | ||
| const float3 | P, | ||
| const float3 | N, | ||
| const int | shader_flags, | ||
| ccl_private LightSample * | ls ) |
Definition at line 41 of file spot.h.
References copysignf, cos_theta(), disk_light_sample(), dot(), FLT_MAX, len_squared(), light_pdf_area_to_solid_angle(), M_PI_F, N, normalize(), normalize_len(), P, ray_sphere_intersect(), safe_sqrtf(), sample_cos_hemisphere(), sample_uniform_cone(), sample_uniform_sphere(), SD_BSDF_HAS_TRANSMISSION, sin_sqr_to_one_minus_cos(), spot_light_attenuation(), spot_light_to_local(), spot_light_uv(), sqr(), and sqrtf.
Referenced by light_sample().
| ccl_device_inline bool spot_light_sample_from_intersection | ( | const ccl_global KernelLight * | klight, |
| const float3 | ray_P, | ||
| const float3 | ray_D, | ||
| const float3 | N, | ||
| const uint32_t | path_flag, | ||
| ccl_private LightSample *ccl_restrict | ls ) |
Definition at line 223 of file spot.h.
References FLT_MAX, len_squared(), light_pdf_area_to_solid_angle(), M_PI_F, N, normalize(), spot_light_attenuation(), spot_light_pdf(), spot_light_to_local(), spot_light_uv(), and sqr().
Referenced by light_sample_from_intersection().
| CCL_NAMESPACE_BEGIN ccl_device float3 spot_light_to_local | ( | const ccl_global KernelLight * | klight, |
| const float3 | ray ) |
Definition at line 12 of file spot.h.
References safe_normalize(), transform_direction(), and float3::z.
Referenced by spot_light_mnee_sample_update(), spot_light_sample(), and spot_light_sample_from_intersection().
| ccl_device_forceinline bool spot_light_tree_parameters | ( | const ccl_global KernelLight * | klight, |
| const float3 | centroid, | ||
| const float3 | P, | ||
| const ccl_private BoundingCone & | bcone, | ||
| ccl_private float & | cos_theta_u, | ||
| ccl_private float2 & | distance, | ||
| ccl_private float3 & | point_to_centroid, | ||
| ccl_private float & | energy ) |
Definition at line 286 of file spot.h.
References cos_from_sin(), cosf, dot(), fast_acosf(), fmaxf, make_float2(), one_float2(), P, safe_normalize_len(), smoothstepf(), sqr(), and sqrtf.
Referenced by light_tree_emitter_importance().
| ccl_device void spot_light_uv | ( | const float3 | ray, |
| const float | half_cot_half_spot_angle, | ||
| ccl_private float * | u, | ||
| ccl_private float * | v ) |
Definition at line 27 of file spot.h.
References v.
Referenced by spot_light_mnee_sample_update(), spot_light_sample(), and spot_light_sample_from_intersection().
| ccl_device_inline bool spot_light_valid_ray_segment | ( | const ccl_global KernelLight * | klight, |
| const float3 | P, | ||
| const float3 | D, | ||
| ccl_private float2 * | t_range ) |
Definition at line 268 of file spot.h.
References make_float3(), P, ray_cone_intersect(), sqr(), transform_direction(), and transform_point().