|
Blender V5.0
|
#include "kernel/integrator/surface_shader.h"#include "kernel/light/distribution.h"#include "kernel/light/light.h"#include "kernel/types.h"#include "kernel/geom/shader_data.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 357 of file cycles/kernel/light/sample.h.
References ccl_device, ccl_private, 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 325 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, D, 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 ccl_device_inline, 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 512 of file cycles/kernel/light/sample.h.
References background_light_pdf(), ccl_device_inline, D, 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 503 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, 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 467 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, 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 423 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, 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 298 of file cycles/kernel/light/sample.h.
References ccl_device_inline, 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, | ||
| const float | time ) |
Definition at line 25 of file cycles/kernel/light/sample.h.
References ccl_global, ccl_private, ccl_restrict, dot(), kernel_data_fetch, LIGHT_BACKGROUND, LIGHT_TRIANGLE, make_float3(), 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(), integrate_surface_direct_light(), and mnee_path_contribution().
| ccl_device_inline bool light_sample_terminate | ( | KernelGlobals | kg, |
| ccl_private BsdfEval *ccl_restrict | eval, | ||
| const float | rand_terminate ) |
Definition at line 94 of file cycles/kernel/light/sample.h.
References bsdf_eval_is_zero(), bsdf_eval_mul(), bsdf_eval_sum(), ccl_device_inline, ccl_private, ccl_restrict, fabs(), kernel_data, and reduce_max().
Referenced by integrate_surface_direct_light().
| ccl_device_inline void light_sample_to_surface_shadow_ray | ( | KernelGlobals | kg, |
| const ccl_private ShaderData *ccl_restrict | sd, | ||
| const ccl_private LightSample *ccl_restrict | ls, | ||
| ccl_private Ray * | ray ) |
Definition at line 258 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, P, shadow_ray_offset(), and shadow_ray_setup().
Referenced by integrate_surface_direct_light().
| ccl_device_inline void light_sample_to_volume_shadow_ray | ( | const ccl_private ShaderData *ccl_restrict | sd, |
| const ccl_private LightSample *ccl_restrict | ls, | ||
| const float3 | P, | ||
| ccl_private Ray * | ray ) |
Definition at line 270 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, 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 390 of file cycles/kernel/light/sample.h.
References area_light_mnee_sample_update(), ccl_device_forceinline, ccl_global, ccl_private, kernel_data_fetch, LIGHT_AREA, LIGHT_POINT, LIGHT_SPOT, N, P, point_light_mnee_sample_update(), and spot_light_mnee_sample_update().
Referenced by mnee_path_contribution().
| ccl_device_inline float3 shadow_ray_offset | ( | KernelGlobals | kg, |
| const ccl_private ShaderData *ccl_restrict | sd, | ||
| const float3 | L, | ||
| ccl_private bool * | r_skip_self ) |
Definition at line 177 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, 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 | ( | const ccl_private ShaderData *ccl_restrict | sd, |
| const ccl_private LightSample *ccl_restrict | ls, | ||
| const float3 | P, | ||
| ccl_private Ray * | ray, | ||
| const bool | skip_self ) |
Definition at line 217 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, differential_make_compact(), differential_zero_compact(), FLT_MAX, OBJECT_NONE, P, PRIM_NONE, safe_normalize_len(), 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, |
| const ccl_private ShaderData *ccl_restrict | sd, | ||
| const float3 | Ng ) |
Definition at line 121 of file cycles/kernel/light/sample.h.
References b, ccl_device_inline, ccl_private, ccl_restrict, 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().