|
Blender V5.0
|
#include "kernel/light/common.h"#include "kernel/light/point.h"#include "util/math_fast.h"#include "util/math_intersect.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 28 of file spot.h.
References ccl_device, ccl_global, smoothstepf(), and float3::z.
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 219 of file spot.h.
References ccl_device_inline, ccl_global, ccl_private, ccl_restrict, dot(), and point_light_intersect().
Referenced by lights_intersect_impl().
| ccl_device_forceinline void spot_light_mnee_sample_update | ( | KernelGlobals | kg, |
| const ccl_global KernelLight * | klight, | ||
| ccl_private LightSample * | ls, | ||
| const float3 | P, | ||
| const float3 | N, | ||
| const uint32_t | path_flag ) |
Definition at line 173 of file spot.h.
References ccl_device_forceinline, ccl_global, ccl_private, fabsf, len_squared(), M_PI_F, N, normalize, P, safe_normalize_len(), 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 157 of file spot.h.
References ccl_device_forceinline, ccl_global, D, M_1_2PI_F, 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 | ( | KernelGlobals | kg, |
| 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 47 of file spot.h.
References ccl_device_inline, ccl_global, ccl_private, copysignf, cos_theta(), disk_light_sample(), dot(), FLT_MAX, len_squared(), light_pdf_area_to_solid_angle(), M_1_2PI_F, M_PI_F, N, normalize, P, ray_sphere_intersect(), safe_normalize_len(), 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 | ( | KernelGlobals | kg, |
| 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 231 of file spot.h.
References ccl_device_inline, ccl_global, ccl_private, ccl_restrict, 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 | ( | KernelGlobals | kg, |
| const ccl_global KernelLight * | klight, | ||
| const float3 | ray ) |
Definition at line 16 of file spot.h.
References ccl_device, ccl_global, lamp_get_inverse_transform(), 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 KernelBoundingCone & | bcone, | ||
| ccl_private float & | cos_theta_u, | ||
| ccl_private float2 & | distance, | ||
| ccl_private float3 & | point_to_centroid, | ||
| ccl_private float & | energy ) |
Definition at line 296 of file spot.h.
References ccl_device_forceinline, ccl_global, ccl_private, cos_from_sin(), cosf, distance(), dot(), fast_acosf(), fmaxf, M_SQRT2_F, 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 33 of file spot.h.
References ccl_device, ccl_private, v, float3::x, float3::y, and float3::z.
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 | ( | KernelGlobals | kg, |
| const ccl_global KernelLight * | klight, | ||
| const float3 | P, | ||
| const float3 | D, | ||
| ccl_private Interval< float > * | t_range ) |
Definition at line 277 of file spot.h.
References ccl_device_inline, ccl_global, ccl_private, D, lamp_get_inverse_transform(), make_float3(), P, ray_cone_intersect(), sqr, transform_direction(), and transform_point().