|
Blender V4.3
|
#include "kernel/integrator/path_state.h"#include "kernel/integrator/surface_shader.h"#include "kernel/light/distribution.h"#include "kernel/light/light.h"#include "kernel/sample/mapping.h"#include "kernel/sample/mis.h"Go to the source code of this file.
| ccl_device bool light_sample_from_position | ( | KernelGlobals | kg, |
| const float3 | rand, | ||
| const float | time, | ||
| const float3 | P, | ||
| const float3 | N, | ||
| const int | object_receiver, | ||
| const int | shader_flags, | ||
| const int | bounce, | ||
| const uint32_t | path_flag, | ||
| ccl_private LightSample * | ls ) |
Definition at line 355 of file cycles/kernel/light/sample.h.
References kernel_data, light_distribution_sample(), light_sample(), light_tree_sample(), N, P, and float3::z.
Referenced by integrate_surface_direct_light().
| ccl_device_inline bool light_sample_from_volume_segment | ( | KernelGlobals | kg, |
| const float3 | rand, | ||
| const float | time, | ||
| const float3 | P, | ||
| const float3 | D, | ||
| const float | t, | ||
| const int | object_receiver, | ||
| const int | bounce, | ||
| const uint32_t | path_flag, | ||
| ccl_private LightSample * | ls ) |
Definition at line 323 of file cycles/kernel/light/sample.h.
References kernel_data, light_distribution_sample(), light_sample(), light_tree_sample(), P, SD_BSDF_HAS_TRANSMISSION, and float3::z.
| ccl_device_inline float light_sample_mis_weight_forward | ( | KernelGlobals | kg, |
| const float | forward_pdf, | ||
| const float | nee_pdf ) |
Definition at line 281 of file cycles/kernel/light/sample.h.
References DIRECT_LIGHT_SAMPLING_FORWARD, DIRECT_LIGHT_SAMPLING_NEE, kernel_data, and power_heuristic().
Referenced by light_sample_mis_weight_forward_background(), light_sample_mis_weight_forward_lamp(), and light_sample_mis_weight_forward_surface().
| ccl_device_inline float light_sample_mis_weight_forward_background | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const uint32_t | path_flag ) |
Definition at line 509 of file cycles/kernel/light/sample.h.
References background_light_pdf(), INTEGRATOR_STATE, kernel_data, kernel_data_fetch, light_distribution_pdf_lamp(), light_link_receiver_forward(), light_sample_mis_weight_forward(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, and state.
Referenced by integrate_background().
| ccl_device_inline float light_sample_mis_weight_forward_distant | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const uint32_t | path_flag, | ||
| const ccl_private LightSample * | ls ) |
Definition at line 500 of file cycles/kernel/light/sample.h.
References INTEGRATOR_STATE, light_sample_mis_weight_forward_lamp(), P, and state.
Referenced by integrate_distant_lights().
| ccl_device_inline float light_sample_mis_weight_forward_lamp | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const uint32_t | path_flag, | ||
| const ccl_private LightSample * | ls, | ||
| const float3 | P ) |
Definition at line 464 of file cycles/kernel/light/sample.h.
References INTEGRATOR_STATE, kernel_data, kernel_data_fetch, light_distribution_pdf_lamp(), light_link_receiver_forward(), light_sample_mis_weight_forward(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, and state.
Referenced by integrate_light(), and light_sample_mis_weight_forward_distant().
| ccl_device_inline float light_sample_mis_weight_forward_surface | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const uint32_t | path_flag, | ||
| const ccl_private ShaderData * | sd ) |
Definition at line 421 of file cycles/kernel/light/sample.h.
References INTEGRATOR_STATE, kernel_data, kernel_data_fetch, light_link_receiver_forward(), light_sample_mis_weight_forward(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, PRIMITIVE_TRIANGLE, SD_BACKFACING, SD_MIS_BACK, SD_MIS_FRONT, state, and triangle_light_pdf().
Referenced by integrate_surface_emission().
| ccl_device_inline float light_sample_mis_weight_nee | ( | KernelGlobals | kg, |
| const float | nee_pdf, | ||
| const float | forward_pdf ) |
Definition at line 297 of file cycles/kernel/light/sample.h.
References DIRECT_LIGHT_SAMPLING_FORWARD, DIRECT_LIGHT_SAMPLING_NEE, kernel_data, and power_heuristic().
Referenced by integrate_surface_direct_light().
| CCL_NAMESPACE_BEGIN ccl_device_noinline_cpu Spectrum light_sample_shader_eval | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| ccl_private ShaderData *ccl_restrict | emission_sd, | ||
| ccl_private LightSample *ccl_restrict | ls, | ||
| float | time ) |
Definition at line 24 of file cycles/kernel/light/sample.h.
References ccl_global, kernel_data_fetch, LAMP_NONE, LIGHT_BACKGROUND, make_float3(), NULL, PATH_RAY_EMISSION, PRIM_NONE, PROFILING_EVENT, PROFILING_INIT_FOR_SHADER, PROFILING_SHADE_LIGHT_EVAL, PROFILING_SHADE_LIGHT_SETUP, PROFILING_SHADER, rgb_to_spectrum(), shader_setup_from_background(), shader_setup_from_sample(), state, surface_shader_background(), surface_shader_constant_emission(), surface_shader_emission(), surface_shader_eval(), and zero_spectrum.
Referenced by integrate_distant_lights(), integrate_light(), and integrate_surface_direct_light().
| ccl_device_inline bool light_sample_terminate | ( | KernelGlobals | kg, |
| ccl_private BsdfEval *ccl_restrict | eval, | ||
| const float | rand_terminate ) |
Definition at line 93 of file cycles/kernel/light/sample.h.
References bsdf_eval_is_zero(), bsdf_eval_mul(), bsdf_eval_sum(), fabs(), kernel_data, and reduce_max().
Referenced by integrate_surface_direct_light().
| ccl_device_inline void light_sample_to_surface_shadow_ray | ( | KernelGlobals | kg, |
| ccl_private const ShaderData *ccl_restrict | sd, | ||
| ccl_private const LightSample *ccl_restrict | ls, | ||
| ccl_private Ray * | ray ) |
Definition at line 257 of file cycles/kernel/light/sample.h.
References P, shadow_ray_offset(), and shadow_ray_setup().
Referenced by integrate_surface_direct_light().
| ccl_device_inline void light_sample_to_volume_shadow_ray | ( | KernelGlobals | kg, |
| ccl_private const ShaderData *ccl_restrict | sd, | ||
| ccl_private const LightSample *ccl_restrict | ls, | ||
| const float3 | P, | ||
| ccl_private Ray * | ray ) |
Definition at line 269 of file cycles/kernel/light/sample.h.
References P, and shadow_ray_setup().
| ccl_device_forceinline void light_sample_update | ( | KernelGlobals | kg, |
| ccl_private LightSample * | ls, | ||
| const float3 | P, | ||
| const float3 | N, | ||
| const uint32_t | path_flag ) |
Definition at line 388 of file cycles/kernel/light/sample.h.
References area_light_mnee_sample_update(), ccl_global, kernel_data_fetch, LIGHT_AREA, LIGHT_POINT, LIGHT_SPOT, N, P, point_light_mnee_sample_update(), and spot_light_mnee_sample_update().
| ccl_device_inline float3 shadow_ray_offset | ( | KernelGlobals | kg, |
| ccl_private const ShaderData *ccl_restrict | sd, | ||
| float3 | L, | ||
| ccl_private bool * | r_skip_self ) |
Definition at line 175 of file cycles/kernel/light/sample.h.
References clamp(), dot(), kernel_data_fetch, L, NL, P, PRIMITIVE_TRIANGLE, SHADER_SMOOTH_NORMAL, and shadow_ray_smooth_surface_offset().
Referenced by light_sample_to_surface_shadow_ray().
| ccl_device_inline void shadow_ray_setup | ( | ccl_private const ShaderData *ccl_restrict | sd, |
| ccl_private const LightSample *ccl_restrict | ls, | ||
| const float3 | P, | ||
| ccl_private Ray * | ray, | ||
| const bool | skip_self ) |
Definition at line 215 of file cycles/kernel/light/sample.h.
References differential_make_compact(), differential_zero_compact(), FLT_MAX, normalize_len(), OBJECT_NONE, P, PRIM_NONE, SHADER_CAST_SHADOW, and zero_float3().
Referenced by light_sample_to_surface_shadow_ray(), and light_sample_to_volume_shadow_ray().
| ccl_device_inline float3 shadow_ray_smooth_surface_offset | ( | KernelGlobals | kg, |
| ccl_private const ShaderData *ccl_restrict | sd, | ||
| float3 | Ng ) |
Definition at line 120 of file cycles/kernel/light/sample.h.
References b, dot(), kernel_assert, max, min, motion_triangle_vertices_and_normals(), N, object_dir_transform(), P, PRIMITIVE_MOTION_TRIANGLE, PRIMITIVE_TRIANGLE, SD_OBJECT_TRANSFORM_APPLIED, triangle_vertices_and_normals(), V, v, and w().
Referenced by shadow_ray_offset().