|
Blender V5.0
|
#include "kernel/closure/bsdf.h"#include "kernel/closure/emissive.h"#include "kernel/film/light_passes.h"#include "kernel/integrator/guiding.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 ) |
Definition at line 270 of file surface_shader.h.
References _surface_shader_exclude(), bsdf_eval(), bsdf_eval_accum(), ccl_device_inline, ccl_private, CLOSURE_IS_BSDF, CLOSURE_IS_BSDF_OR_BSSRDF, and i.
Referenced by 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 239 of file surface_shader.h.
References 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(), and surface_shader_bsdf_eval_pdfs().
| ccl_device Spectrum surface_shader_alpha | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 959 of file surface_shader.h.
References ccl_device, ccl_private, one_spectrum, saturate, and surface_shader_transparency().
Referenced by film_write_data_passes().
| ccl_device Spectrum surface_shader_ao | ( | const ccl_private ShaderData * | sd, |
| const float | ao_factor, | ||
| ccl_private float3 * | N_ ) |
Definition at line 1027 of file surface_shader.h.
References average(), ccl_device, ccl_private, CLOSURE_IS_BSDF_DIFFUSE, fabsf, i, is_zero(), N, N_, normalize, zero_float3(), and zero_spectrum.
| ccl_device Spectrum surface_shader_apply_holdout | ( | ccl_private ShaderData * | sd | ) |
Definition at line 1112 of file surface_shader.h.
References ccl_device, ccl_private, CLOSURE_IS_BSDF_TRANSPARENT, CLOSURE_IS_HOLDOUT, i, NBUILTIN_CLOSURES, one_spectrum, SD_BSDF, SD_CLOSURE_FLAGS, SD_HAS_ONLY_VOLUME, SD_OBJECT_HOLDOUT_MASK, SD_TRANSPARENT, and zero_spectrum.
Referenced by integrate_surface_holdout().
| ccl_device float3 surface_shader_average_normal | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1013 of file surface_shader.h.
References average(), ccl_device, ccl_private, CLOSURE_IS_BSDF_OR_BSSRDF, fabsf, i, is_zero(), N, normalize, and zero_float3().
Referenced by film_write_data_passes().
| ccl_device float surface_shader_average_roughness | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 925 of file surface_shader.h.
References average(), bsdf_get_roughness_pass_squared(), ccl_device, ccl_private, CLOSURE_IS_BSDF, fabsf, i, and sqrtf.
Referenced by film_write_data_passes().
| ccl_device Spectrum surface_shader_background | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1092 of file surface_shader.h.
References ccl_device, ccl_private, SD_EMISSION, and zero_spectrum.
Referenced by integrator_eval_background_shader(), kernel_background_evaluate(), and light_sample_shader_eval().
| 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 408 of file surface_shader.h.
References ccl_device_inline, ccl_private, ccl_restrict, CLOSURE_IS_BSDF_OR_BSSRDF, i, and sum().
Referenced by integrate_surface_bsdf_bssrdf_bounce().
| ccl_device float surface_shader_bsdf_eval | ( | KernelGlobals | kg, |
| IntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| const float3 | wo, | ||
| ccl_private BsdfEval * | bsdf_eval, | ||
| const uint | light_shader_flags ) |
Definition at line 365 of file surface_shader.h.
References _surface_shader_bsdf_eval_mis(), bsdf_eval(), bsdf_eval_init(), ccl_private, guiding_bsdf_pdf(), GUIDING_DIRECTIONAL_SAMPLING_TYPE_RIS, INTEGRATOR_STATE, kernel_data, KERNEL_FEATURE_PATH_GUIDING, SHADER_USE_MIS, state, and zero_spectrum.
Referenced by integrate_surface_direct_light(), and mnee_path_contribution().
| 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 ) |
Definition at line 308 of file surface_shader.h.
References _surface_shader_exclude(), bsdf_eval(), bsdf_eval_accum(), bsdf_eval_init(), ccl_device_inline, ccl_private, CLOSURE_IS_BSDF, CLOSURE_IS_BSDF_OR_BSSRDF, i, kernel_assert, and zero_spectrum.
| 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 ) |
Definition at line 891 of file surface_shader.h.
References _surface_shader_bsdf_eval_mis(), bsdf_eval(), bsdf_eval_init(), bsdf_sample(), ccl_device, ccl_private, CLOSURE_IS_BSDF, kernel_assert, and zero_spectrum.
Referenced by integrate_surface_bsdf_bssrdf_bounce().
| 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 452 of file surface_shader.h.
References ccl_private, ccl_restrict, CLOSURE_IS_BSDF_OR_BSSRDF, i, and sum().
| ccl_device bool surface_shader_constant_emission | ( | KernelGlobals | kg, |
| const int | shader, | ||
| ccl_private Spectrum * | eval ) |
Definition at line 1070 of file surface_shader.h.
References ccl_device, ccl_private, kernel_data_fetch, make_float3(), rgb_to_spectrum(), SD_HAS_CONSTANT_EMISSION, and SHADER_MASK.
Referenced by integrator_eval_background_shader(), and light_sample_shader_eval().
| ccl_device Spectrum surface_shader_diffuse | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 968 of file surface_shader.h.
References bsdf_albedo(), ccl_device, ccl_private, CLOSURE_IS_BSDF_DIFFUSE, CLOSURE_IS_BSSRDF, i, and zero_spectrum.
Referenced by film_write_data_passes().
| ccl_device Spectrum surface_shader_emission | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 1102 of file surface_shader.h.
References ccl_device, ccl_private, emissive_simple_eval(), SD_EMISSION, and zero_spectrum.
Referenced by integrate_surface_emission(), and light_sample_shader_eval().
| ccl_device void surface_shader_eval | ( | KernelGlobals | kg, |
| ConstIntegratorGenericState | state, | ||
| ccl_private ShaderData *ccl_restrict | sd, | ||
| ccl_global float *ccl_restrict | buffer, | ||
| const uint32_t | path_flag, | ||
| bool | use_caustics_storage = false ) |
Definition at line 1150 of file surface_shader.h.
References bsdf_alloc(), bsdf_diffuse_setup(), CAUSTICS_MAX_CLOSURE, ccl_device, ccl_global, ccl_private, ccl_restrict, kernel_data, KERNEL_FEATURE_OSL_SHADING, make_spectrum, OBJECT_NONE, osl_eval_nodes< SHADER_TYPE_SURFACE >(), PATH_RAY_EMISSION, PATH_RAY_SHADOW, PATH_RAY_TERMINATE, SD_EMISSION, state, svm_eval_nodes(), and zero_spectrum.
Referenced by integrate_surface(), integrator_eval_background_shader(), kernel_background_evaluate(), kernel_curve_shadow_transparency_evaluate(), kernel_path_mnee_sample(), light_sample_shader_eval(), and mnee_path_contribution().
| ccl_device Spectrum surface_shader_glossy | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 983 of file surface_shader.h.
References bsdf_albedo(), ccl_device, ccl_private, CLOSURE_IS_BSDF_GLOSSY, CLOSURE_IS_GLASS, i, and zero_spectrum.
Referenced by film_write_data_passes().
| CCL_NAMESPACE_BEGIN ccl_device_inline void surface_shader_prepare_closures | ( | KernelGlobals | kg, |
| ConstIntegratorState | state, | ||
| ccl_private ShaderData * | sd, | ||
| const uint32_t | path_flag ) |
Definition at line 141 of file surface_shader.h.
References __MNEE__, bsdf_blur(), BSDF_ROUGHNESS_SQ_THRESH, 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, i, INTEGRATOR_STATE, kernel_data, PATH_MNEE_VALID, PATH_RAY_CAMERA, SD_BSDF_HAS_EVAL, SD_HOLDOUT, sqr, sqrtf, state, and zero_spectrum.
Referenced by integrate_surface().
| ccl_device Spectrum surface_shader_transmission | ( | KernelGlobals | kg, |
| const ccl_private ShaderData * | sd ) |
Definition at line 998 of file surface_shader.h.
References bsdf_albedo(), ccl_device, ccl_private, CLOSURE_IS_BSDF_TRANSMISSION, CLOSURE_IS_GLASS, i, and zero_spectrum.
Referenced by film_write_data_passes().
| ccl_device Spectrum surface_shader_transparency | ( | const ccl_private ShaderData * | sd | ) |
Definition at line 948 of file surface_shader.h.
References ccl_device, ccl_private, one_spectrum, SD_HAS_ONLY_VOLUME, SD_RAY_PORTAL, SD_TRANSPARENT, and zero_spectrum.
Referenced by film_write_data_passes(), kernel_curve_shadow_transparency_evaluate(), and surface_shader_alpha().