Blender V4.3
spot.h File Reference

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device float3 spot_light_to_local (const ccl_global KernelLight *klight, const float3 ray)
 
ccl_device float spot_light_attenuation (const ccl_global KernelSpotLight *spot, const float3 ray)
 
ccl_device void spot_light_uv (const float3 ray, const float half_cot_half_spot_angle, ccl_private float *u, ccl_private float *v)
 
template<bool in_volume_segment>
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)
 
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)
 
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)
 
ccl_device_inline bool spot_light_intersect (const ccl_global KernelLight *klight, const ccl_private Ray *ccl_restrict ray, ccl_private float *t)
 
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)
 
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)
 
template<bool in_volume_segment>
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)
 

Function Documentation

◆ spot_light_attenuation()

ccl_device float spot_light_attenuation ( const ccl_global KernelSpotLight * spot,
const float3 ray )

◆ spot_light_intersect()

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().

◆ spot_light_mnee_sample_update()

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 )

◆ spot_light_pdf()

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 )

◆ spot_light_sample()

◆ spot_light_sample_from_intersection()

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 )

◆ spot_light_to_local()

◆ spot_light_tree_parameters()

template<bool in_volume_segment>
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 )

◆ spot_light_uv()

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().

◆ spot_light_valid_ray_segment()

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().