|
Blender V5.3
|
#include "kernel/closure/bsdf.h"#include "kernel/closure/emissive.h"#include "kernel/film/light_passes.h"#include "kernel/integrator/guiding.h"#include "kernel/integrator/state_util.h"Go to the source code of this file.
| ccl_device_inline float _surface_shader_bsdf_eval_mis | ( | KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const float3 | wo, | ||
| const ccl_private ShaderClosure * | skip_sc, | ||
| ccl_private BsdfEval * | result_eval, | ||
| float | sum_pdf, | ||
| float | sum_sample_weight, | ||
| const uint | light_shader_flags, | ||
| float | sum_pdf_roughness_squared, | ||
| ccl_private float & | r_avg_roughness_squared ) |
Definition at line 277 of file surface_shader.h.
References _surface_shader_bsdf_eval_mis(), _surface_shader_exclude(), bsdf_eval(), bsdf_eval_accum(), bsdf_get_specular_roughness_squared(), ccl_device_inline, ccl_private, CLOSURE_IS_BSDF, and CLOSURE_IS_BSDF_OR_BSSRDF.
Referenced by _surface_shader_bsdf_eval_mis(), surface_shader_bsdf_eval(), and surface_shader_bsdf_sample_closure().
| ccl_device_forceinline bool _surface_shader_exclude | ( | ClosureType | type, |
| const uint | light_shader_flags ) |
Definition at line 246 of file surface_shader.h.
References _surface_shader_exclude(), ccl_device_forceinline, CLOSURE_IS_BSDF_DIFFUSE, CLOSURE_IS_BSDF_GLOSSY, CLOSURE_IS_BSDF_TRANSMISSION, CLOSURE_IS_GLASS, SHADER_EXCLUDE_ANY, SHADER_EXCLUDE_DIFFUSE, SHADER_EXCLUDE_GLOSSY, and SHADER_EXCLUDE_TRANSMIT.
Referenced by _surface_shader_bsdf_eval_mis(), _surface_shader_exclude(), and surface_shader_bsdf_eval_pdfs().
| ccl_device Spectrum surface_shader_alpha | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1063 of file surface_shader.h.
References ccl_device, ccl_private, one_spectrum, saturate, surface_shader_alpha(), and surface_shader_transparency().
Referenced by film_write_data_passes(), and surface_shader_alpha().
| ccl_device Spectrum surface_shader_ao | ( | const ccl_private ShaderData * | sd, |
| const float | ao_factor, | ||
| ccl_private float3 * | N_ ) |
Definition at line 1131 of file surface_shader.h.
References average(), ccl_device, ccl_private, CLOSURE_IS_BSDF_DIFFUSE, fabsf, is_zero(), N, N_, normalize, surface_shader_ao(), zero_float3(), and zero_spectrum.
Referenced by surface_shader_ao().
| ccl_device Spectrum surface_shader_apply_holdout | ( | ccl_private ShaderData * | sd | ) |
Definition at line 1216 of file surface_shader.h.
References ccl_device, ccl_private, CLOSURE_IS_BSDF_TRANSPARENT, CLOSURE_IS_HOLDOUT, NBUILTIN_CLOSURES, one_spectrum, SD_HAS_ONLY_VOLUME, SD_OBJECT_HOLDOUT_MASK, SR_BSDF, SR_CLOSURE_FLAG, SR_TRANSPARENT, surface_shader_apply_holdout(), and zero_spectrum.
Referenced by integrate_surface_holdout(), and surface_shader_apply_holdout().
| ccl_device float3 surface_shader_average_normal | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1117 of file surface_shader.h.
References average(), ccl_device, ccl_private, CLOSURE_IS_BSDF_OR_BSSRDF, fabsf, is_zero(), N, normalize, surface_shader_average_normal(), and zero_float3().
Referenced by film_write_data_passes(), and surface_shader_average_normal().
| ccl_device float surface_shader_average_roughness | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1029 of file surface_shader.h.
References average(), bsdf_get_roughness_pass_squared(), ccl_device, ccl_private, CLOSURE_IS_BSDF, fabsf, sqrtf, and surface_shader_average_roughness().
Referenced by film_write_data_passes(), and surface_shader_average_roughness().
| ccl_device Spectrum surface_shader_background | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1196 of file surface_shader.h.
References ccl_device, ccl_private, SR_EMISSION, surface_shader_background(), and zero_spectrum.
Referenced by integrate_light_nee(), integrator_eval_background_shader(), kernel_background_evaluate(), and surface_shader_background().
| const ccl_device_inline ccl_private ShaderClosure * surface_shader_bsdf_bssrdf_pick | ( | const ccl_private ShaderData *ccl_restrict | sd, |
| ccl_private float3 * | rand_bsdf ) |
Definition at line 441 of file surface_shader.h.
References ccl_device_inline, ccl_private, ccl_restrict, CLOSURE_IS_BSDF_OR_BSSRDF, and surface_shader_bsdf_bssrdf_pick().
Referenced by integrate_surface_bsdf_bssrdf_bounce(), and surface_shader_bsdf_bssrdf_pick().
| ccl_device float surface_shader_bsdf_eval | ( | KernelGlobals | kg, |
| ccl_attr_maybe_unused IntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| const float3 | wo, | ||
| ccl_private BsdfEval * | bsdf_eval, | ||
| const uint | light_shader_flags, | ||
| ccl_private float & | r_avg_roughness_squared ) |
Definition at line 389 of file surface_shader.h.
References _surface_shader_bsdf_eval_mis(), bsdf_eval(), bsdf_eval_init(), ccl_attr_maybe_unused, ccl_private, guiding_bsdf_pdf(), GUIDING_DIRECTIONAL_SAMPLING_TYPE_RIS, INTEGRATOR_STATE, kernel_data, KERNEL_FEATURE_PATH_GUIDING, SHADER_USE_MIS, state, surface_guiding_sampling_prob, surface_shader_bsdf_eval(), and zero_spectrum.
Referenced by integrate_surface_direct_light(), and surface_shader_bsdf_eval().
| ccl_device_inline float surface_shader_bsdf_eval_pdfs | ( | const KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const float3 | wo, | ||
| ccl_private BsdfEval * | result_eval, | ||
| ccl_private float * | pdfs, | ||
| const uint | light_shader_flags, | ||
| ccl_private float & | r_avg_roughness_squared ) |
Definition at line 324 of file surface_shader.h.
References _surface_shader_exclude(), bsdf_eval(), bsdf_eval_accum(), bsdf_eval_init(), bsdf_get_specular_roughness_squared(), ccl_device_inline, ccl_private, CLOSURE_IS_BSDF, CLOSURE_IS_BSDF_OR_BSSRDF, kernel_assert, surface_shader_bsdf_eval_pdfs(), and zero_spectrum.
Referenced by surface_shader_bsdf_eval_pdfs().
| ccl_device int surface_shader_bsdf_sample_closure | ( | KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const ccl_private ShaderClosure * | sc, | ||
| const float3 | rand_bsdf, | ||
| ccl_private BsdfEval * | bsdf_eval, | ||
| ccl_private float3 * | wo, | ||
| ccl_private float * | pdf, | ||
| ccl_private float2 * | sampled_roughness, | ||
| ccl_private float * | eta, | ||
| ccl_private float & | r_avg_roughness_squared ) |
Definition at line 978 of file surface_shader.h.
References _surface_shader_bsdf_eval_mis(), bsdf_eval(), bsdf_eval_init(), bsdf_get_specular_roughness_squared(), bsdf_sample(), ccl_device, ccl_private, CLOSURE_IS_BSDF, kernel_assert, surface_shader_bsdf_sample_closure(), and zero_spectrum.
Referenced by integrate_surface_bsdf_bssrdf_bounce(), and surface_shader_bsdf_sample_closure().
| ccl_device_inline Spectrum surface_shader_bssrdf_sample_weight | ( | const ccl_private ShaderData *ccl_restrict | sd, |
| const ccl_private ShaderClosure *ccl_restrict | bssrdf_sc ) |
Definition at line 485 of file surface_shader.h.
References ccl_private, ccl_restrict, CLOSURE_IS_BSDF_OR_BSSRDF, and surface_shader_bssrdf_sample_weight().
Referenced by surface_shader_bssrdf_sample_weight().
| ccl_device bool surface_shader_constant_emission | ( | KernelGlobals | kg, |
| const int | shader, | ||
| ccl_private Spectrum * | eval ) |
Definition at line 1174 of file surface_shader.h.
References ccl_device, ccl_private, kernel_data_fetch, make_float3(), rgb_to_spectrum(), SD_HAS_CONSTANT_EMISSION, SHADER_MASK, and surface_shader_constant_emission().
Referenced by integrator_eval_background_shader(), light_sample_shader_eval_forward(), light_sample_shader_eval_nee_constant(), and surface_shader_constant_emission().
| ccl_device Spectrum surface_shader_diffuse | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 1072 of file surface_shader.h.
References ccl_device, ccl_private, closure_albedo(), CLOSURE_IS_BSDF_DIFFUSE, CLOSURE_IS_BSSRDF, surface_shader_diffuse(), and zero_spectrum.
Referenced by film_write_data_passes(), and surface_shader_diffuse().
| ccl_device Spectrum surface_shader_emission | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1206 of file surface_shader.h.
References ccl_device, ccl_private, emissive_simple_eval(), SR_EMISSION, surface_shader_emission(), and zero_spectrum.
Referenced by integrate_light_nee(), integrate_surface_emission(), light_sample_shader_eval_forward(), and surface_shader_emission().
| ccl_device void surface_shader_eval | ( | KernelGlobals | kg, |
| ConstIntegratorGenericState | state, | ||
| ccl_private ShaderData *ccl_restrict | sd, | ||
| ccl_global float *ccl_restrict | buffer, | ||
| const PathRayVisibility | path_visibility, | ||
| const uint32_t | path_flag, | ||
| bool | use_caustics_storage = false ) |
Definition at line 1254 of file surface_shader.h.
References bsdf_diffuse_setup(), CAUSTICS_MAX_CLOSURE, ccl_device, ccl_global, ccl_private, ccl_restrict, integrator_state_lcg_init(), kernel_data, KERNEL_FEATURE_OSL_SHADING, make_spectrum, OBJECT_NONE, osl_eval_nodes(), PATH_RAY_EMISSION, PATH_RAY_TERMINATE, PATH_RAY_VISIBILITY_SHADOW, SR_EMISSION, state, surface_shader_eval(), svm_eval_nodes(), and zero_spectrum.
Referenced by integrate_light_nee(), integrate_surface(), integrator_eval_background_shader(), kernel_background_evaluate(), kernel_curve_shadow_transparency_evaluate(), kernel_path_mnee_sample(), light_sample_shader_eval_forward(), mnee_path_contribution(), and surface_shader_eval().
| ccl_device Spectrum surface_shader_glossy | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 1087 of file surface_shader.h.
References ccl_device, ccl_private, closure_albedo(), CLOSURE_IS_BSDF_GLOSSY, CLOSURE_IS_GLASS, surface_shader_glossy(), and zero_spectrum.
Referenced by film_write_data_passes(), and surface_shader_glossy().
| CCL_NAMESPACE_BEGIN ccl_device_inline void surface_shader_prepare_closures | ( | KernelGlobals | kg, |
| ConstIntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| const PathRayVisibility | path_visibility ) |
Definition at line 142 of file surface_shader.h.
References __MNEE__, alpha_is_almost_specular(), bsdf_blur(), ccl_device_inline, ccl_private, CLOSURE_HOLDOUT_ID, CLOSURE_IS_BSDF, CLOSURE_IS_BSDF_DIFFUSE, CLOSURE_IS_BSDF_GLOSSY, CLOSURE_IS_BSDF_TRANSMISSION, CLOSURE_IS_BSDF_TRANSPARENT, CLOSURE_IS_GLASS, CLOSURE_NONE_ID, FILTER_CLOSURE_DIFFUSE, FILTER_CLOSURE_DIRECT_LIGHT, FILTER_CLOSURE_EMISSION, FILTER_CLOSURE_GLOSSY, FILTER_CLOSURE_TRANSMISSION, FILTER_CLOSURE_TRANSPARENT, FLT_MAX, INTEGRATOR_STATE, kernel_data, PATH_MNEE_VALID, PATH_RAY_VISIBILITY_CAMERA, sqrtf, SR_BSDF, SR_BSDF_HAS_EVAL, SR_HOLDOUT, state, surface_shader_prepare_closures(), and zero_spectrum.
Referenced by integrate_surface(), and surface_shader_prepare_closures().
| ccl_device Spectrum surface_shader_transmission | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 1102 of file surface_shader.h.
References ccl_device, ccl_private, closure_albedo(), CLOSURE_IS_BSDF_TRANSMISSION, CLOSURE_IS_GLASS, surface_shader_transmission(), and zero_spectrum.
Referenced by film_write_data_passes(), and surface_shader_transmission().
| ccl_device Spectrum surface_shader_transparency | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1052 of file surface_shader.h.
References ccl_device, ccl_private, one_spectrum, SD_HAS_ONLY_VOLUME, SR_RAY_PORTAL, SR_TRANSPARENT, surface_shader_transparency(), and zero_spectrum.
Referenced by film_write_data_passes(), kernel_curve_shadow_transparency_evaluate(), surface_shader_alpha(), and surface_shader_transparency().