|
Blender V5.3
|
#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 | runtime_flags, | ||
| const int | bounce, | ||
| const uint32_t | path_flag, | ||
| ccl_private LightSample * | ls ) |
Definition at line 403 of file cycles/kernel/light/sample.h.
References ccl_device, ccl_private, kernel_data, light_distribution_sample(), light_sample(), light_sample_from_position(), light_tree_sample(), N, P, and float3::z.
Referenced by integrate_surface_direct_light(), and light_sample_from_position().
| 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 371 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, D, kernel_data, light_distribution_sample(), light_sample(), light_sample_from_volume_segment(), light_tree_sample(), P, SR_BSDF_HAS_TRANSMISSION, and float3::z.
Referenced by light_sample_from_volume_segment().
| ccl_device_inline float light_sample_mis_weight_forward | ( | KernelGlobals | kg, |
| const float | forward_pdf, | ||
| const float | nee_pdf ) |
Definition at line 327 of file cycles/kernel/light/sample.h.
References ccl_device_inline, DIRECT_LIGHT_SAMPLING_FORWARD, DIRECT_LIGHT_SAMPLING_NEE, kernel_data, light_sample_mis_weight_forward(), and power_heuristic().
Referenced by light_sample_mis_weight_forward(), 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 PathRayVisibility | path_visibility, | ||
| const uint32_t | path_flag ) |
Definition at line 576 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_sample_mis_weight_forward_background(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, and state.
Referenced by integrate_background(), and light_sample_mis_weight_forward_background().
| ccl_device_inline float light_sample_mis_weight_forward_distant | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const PathRayVisibility | path_visibility, | ||
| const uint32_t | path_flag, | ||
| const int | object_id, | ||
| const float | light_sample_pdf ) |
Definition at line 563 of file cycles/kernel/light/sample.h.
References ccl_device_inline, INTEGRATOR_STATE, light_sample_mis_weight_forward_distant(), light_sample_mis_weight_forward_lamp(), P, and state.
Referenced by integrate_sun_lights(), and light_sample_mis_weight_forward_distant().
| ccl_device_inline float light_sample_mis_weight_forward_lamp | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const PathRayVisibility | path_visibility, | ||
| const uint32_t | path_flag, | ||
| const int | object_id, | ||
| const float | light_sample_pdf, | ||
| const float3 | P ) |
Definition at line 523 of file cycles/kernel/light/sample.h.
References ccl_device_inline, INTEGRATOR_STATE, kernel_data, kernel_data_fetch, light_distribution_pdf_lamp(), light_link_receiver_forward(), light_sample_mis_weight_forward(), light_sample_mis_weight_forward_lamp(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, and state.
Referenced by integrate_light_forward(), light_sample_mis_weight_forward_distant(), and light_sample_mis_weight_forward_lamp().
| ccl_device_inline float light_sample_mis_weight_forward_surface | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const PathRayVisibility | path_visibility, | ||
| const uint32_t | path_flag, | ||
| const ccl_private ShaderData * | sd ) |
Definition at line 469 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_sample_mis_weight_forward_surface(), light_tree_pdf(), N, P, PATH_RAY_MIS_SKIP, PRIMITIVE_TRIANGLE, SD_MIS_BACK, SD_MIS_FRONT, SR_BACKFACING, state, and triangle_light_pdf().
Referenced by integrate_surface_emission(), and light_sample_mis_weight_forward_surface().
| ccl_device_inline float light_sample_mis_weight_nee | ( | KernelGlobals | kg, |
| const float | nee_pdf, | ||
| const float | forward_pdf ) |
Definition at line 344 of file cycles/kernel/light/sample.h.
References ccl_device_inline, DIRECT_LIGHT_SAMPLING_FORWARD, DIRECT_LIGHT_SAMPLING_NEE, kernel_data, light_sample_mis_weight_nee(), and power_heuristic().
Referenced by integrate_surface_direct_light(), and light_sample_mis_weight_nee().
| ccl_device_noinline_cpu ShaderEvalResult light_sample_shader_eval_forward | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| const int | light_id, | ||
| const float3 | ray_P, | ||
| const float3 | ray_D, | ||
| const float | t, | ||
| const float | time, | ||
| ccl_private Spectrum & | r_eval ) |
Definition at line 45 of file cycles/kernel/light/sample.h.
References AS_SHADER_DATA, ccl_global, ccl_private, FLT_MAX, kernel_data_fetch, light_normal_uv_from_position(), light_sample_shader_eval_forward(), make_float3(), P, PATH_RAY_EMISSION, PATH_RAY_VISIBILITY_NONE, PROFILING_EVENT, PROFILING_INIT_FOR_SHADER, PROFILING_SHADE_LIGHT_EVAL, PROFILING_SHADE_LIGHT_SETUP, PROFILING_SHADER, rgb_to_spectrum(), SHADER_EVAL_CACHE_MISS, SHADER_EVAL_OK, shader_setup_from_sample(), SR_CACHE_MISS, state, surface_shader_constant_emission(), surface_shader_emission(), surface_shader_eval(), float2::x, float2::y, zero_float2(), zero_float3(), and zero_spectrum.
Referenced by integrate_light_forward(), integrate_sun_lights(), and light_sample_shader_eval_forward().
| CCL_NAMESPACE_BEGIN ccl_device bool light_sample_shader_eval_nee_constant | ( | KernelGlobals | kg, |
| const int | shader_id, | ||
| const int | prim, | ||
| const bool | is_light, | ||
| ccl_private Spectrum & | eval ) |
Definition at line 24 of file cycles/kernel/light/sample.h.
References ccl_device, ccl_global, ccl_private, is_light(), kernel_data_fetch, light_sample_shader_eval_nee_constant(), make_float3(), one_spectrum, rgb_to_spectrum(), and surface_shader_constant_emission().
Referenced by integrate_surface_direct_light(), and light_sample_shader_eval_nee_constant().
| ccl_device_inline bool light_sample_terminate | ( | KernelGlobals | kg, |
| ccl_private BsdfEval *ccl_restrict | eval, | ||
| const float | rand_terminate ) |
Definition at line 122 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, light_sample_terminate(), and light_sample_terminate_probability().
Referenced by integrate_light_nee(), integrate_surface_direct_light(), light_sample_terminate(), and light_sample_terminate().
| ccl_device_inline bool light_sample_terminate | ( | KernelGlobals | kg, |
| ccl_private Spectrum & | light_eval, | ||
| const float | bsdf_eval, | ||
| const float | rand_terminate ) |
Definition at line 141 of file cycles/kernel/light/sample.h.
References bsdf_eval(), ccl_device_inline, ccl_private, is_zero(), light_sample_terminate(), and light_sample_terminate_probability().
| ccl_device_inline float light_sample_terminate_probability | ( | KernelGlobals | kg, |
| ccl_private Spectrum | eval ) |
Definition at line 114 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, fabs(), kernel_data, light_sample_terminate_probability(), and reduce_max().
Referenced by light_sample_terminate(), light_sample_terminate(), and light_sample_terminate_probability().
| 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 304 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, light_sample_to_surface_shadow_ray(), P, shadow_ray_offset(), and shadow_ray_setup().
Referenced by integrate_surface_direct_light(), and light_sample_to_surface_shadow_ray().
| 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 316 of file cycles/kernel/light/sample.h.
References ccl_device_inline, ccl_private, ccl_restrict, light_sample_to_volume_shadow_ray(), P, and shadow_ray_setup().
Referenced by light_sample_to_volume_shadow_ray().
| 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 436 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_sample_update(), LIGHT_SPOT, N, P, point_light_mnee_sample_update(), and spot_light_mnee_sample_update().
Referenced by light_sample_update(), and 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 225 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, shadow_ray_offset(), and shadow_ray_smooth_surface_offset().
Referenced by light_sample_to_surface_shadow_ray(), and shadow_ray_offset().
| 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 265 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 shadow_ray_setup().
Referenced by light_sample_to_surface_shadow_ray(), light_sample_to_volume_shadow_ray(), and shadow_ray_setup().
| ccl_device_inline float3 shadow_ray_smooth_surface_offset | ( | KernelGlobals | kg, |
| const ccl_private ShaderData *ccl_restrict | sd, | ||
| const float3 | Ng ) |
Definition at line 169 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, shadow_ray_smooth_surface_offset(), triangle_vertices_and_normals(), V, and w().
Referenced by shadow_ray_offset(), and shadow_ray_smooth_surface_offset().