22#define OSL_CLOSURE_STRUCT_BEGIN(Upper, lower) \
23 struct ccl_align(8) Upper##Closure { \
25#define OSL_CLOSURE_STRUCT_END(Upper, lower) \
28#define OSL_CLOSURE_STRUCT_MEMBER(Upper, TYPE, type, name, key) type name;
29#define OSL_CLOSURE_STRUCT_ARRAY_MEMBER(Upper, TYPE, type, name, key, size) type name[size];
44 if (layer_albedo !=
nullptr) {
50 const uint32_t path_flag,
57 const bool reflect_caustics_disabled = !
kernel_data.integrator.caustics_reflective;
58 const bool refract_caustics_disabled = !
kernel_data.integrator.caustics_refractive;
61 if (reflect_caustics_disabled && has_reflect && !has_transmit) {
65 if (refract_caustics_disabled && has_transmit && !has_reflect) {
69 if (reflect_caustics_disabled && refract_caustics_disabled) {
81 const uint32_t path_flag,
104 const uint32_t path_flag,
120 bsdf->roughness = closure->roughness;
128 const uint32_t path_flag,
130 const ccl_private OrenNayarDiffuseBSDFClosure *closure,
144 bsdf->roughness = closure->roughness;
154 ccl_private const BurleyDiffuseBSDFClosure *closure,
169 sd->flag |= bsdf_burley_setup(bsdf, closure->roughness);
174 const uint32_t path_flag,
196 const uint32_t path_flag,
212 bsdf->alpha_x = bsdf->alpha_y = 0.0f;
219 const uint32_t path_flag,
235 bsdf->ior = closure->ior;
236 bsdf->alpha_x = bsdf->alpha_y = 0.0f;
243 const uint32_t path_flag,
264 const uint32_t path_flag,
271 const bool has_reflection = !
is_zero(closure->reflection_tint);
272 const bool has_transmission = !
is_zero(closure->transmission_tint);
291 bsdf->alpha_x = closure->alpha_x;
292 bsdf->alpha_y = closure->alpha_y;
293 bsdf->ior = closure->ior;
294 bsdf->T = closure->T;
296 bool preserve_energy =
false;
299 if (closure->distribution ==
make_string(
"beckmann", 14712237670914973463ull)) {
300 if (has_reflection && has_transmission) {
303 else if (has_transmission) {
312 if (has_reflection && has_transmission) {
315 else if (has_transmission) {
322 preserve_energy = (closure->distribution ==
make_string(
"multi_ggx", 16842698693386468366ull));
326 fresnel->transmission_tint =
rgb_to_spectrum(closure->transmission_tint);
327 fresnel->thin_film.thickness = closure->thinfilm_thickness;
328 fresnel->thin_film.ior = closure->thinfilm_ior;
331 if (layer_albedo !=
nullptr) {
332 if (has_reflection && !has_transmission) {
343 const uint32_t path_flag,
365 bsdf->alpha_x = closure->alpha_x;
366 bsdf->alpha_y = closure->alpha_y;
368 bsdf->T = closure->T;
370 bool preserve_energy =
false;
373 if (closure->distribution ==
make_string(
"beckmann", 14712237670914973463ull)) {
379 preserve_energy = (closure->distribution ==
make_string(
"multi_ggx", 16842698693386468366ull));
382 fresnel->thin_film.thickness = closure->thinfilm_thickness;
383 fresnel->thin_film.ior = closure->thinfilm_ior;
392 const uint32_t path_flag,
394 const ccl_private GeneralizedSchlickBSDFClosure *closure,
399 const bool has_reflection = !
is_zero(closure->reflection_tint);
400 const bool has_transmission = !
is_zero(closure->transmission_tint);
403 if (has_transmission) {
424 bsdf->alpha_x = closure->alpha_x;
425 bsdf->alpha_y = closure->alpha_y;
426 bsdf->T = closure->T;
428 if (closure->exponent < 0.0f) {
433 bsdf->ior = -closure->exponent;
439 bool preserve_energy =
false;
442 if (closure->distribution ==
make_string(
"beckmann", 14712237670914973463ull)) {
443 if (has_reflection && has_transmission) {
446 else if (has_transmission) {
455 if (has_reflection && has_transmission) {
458 else if (has_transmission) {
465 preserve_energy = (closure->distribution ==
make_string(
"multi_ggx", 16842698693386468366ull));
468 const bool reflective_caustics = (
kernel_data.integrator.caustics_reflective ||
470 const bool refractive_caustics = (
kernel_data.integrator.caustics_refractive ||
473 fresnel->reflection_tint = reflective_caustics ?
rgb_to_spectrum(closure->reflection_tint) :
475 fresnel->transmission_tint = refractive_caustics ?
rgb_to_spectrum(closure->transmission_tint) :
479 fresnel->exponent = closure->exponent;
480 fresnel->thin_film.thickness = closure->thinfilm_thickness;
481 fresnel->thin_film.ior = closure->thinfilm_ior;
484 if (layer_albedo !=
nullptr) {
485 if (has_reflection && !has_transmission) {
498 const uint32_t path_flag,
517 bsdf->alpha_x = closure->alpha_x;
518 bsdf->alpha_y = closure->alpha_y;
519 bsdf->ior = closure->ior;
520 bsdf->T = closure->T;
523 if (closure->distribution ==
make_string(
"beckmann", 14712237670914973463ull)) {
524 if (closure->refract == 1) {
527 else if (closure->refract == 2) {
535 else if (closure->distribution ==
make_string(
"ashikhmin_shirley", 11318482998918370922ull)) {
540 if (closure->refract == 1) {
543 else if (closure->refract == 2) {
550 if (closure->distribution ==
make_string(
"multi_ggx", 16842698693386468366ull)) {
556 if (layer_albedo !=
nullptr) {
557 if (closure->refract == 0) {
571 const uint32_t path_flag,
573 const ccl_private MicrofacetF82TintClosure *closure,
593 bsdf->alpha_x = closure->alpha_x;
594 bsdf->alpha_y = closure->alpha_y;
596 bsdf->T = closure->T;
598 bool preserve_energy =
false;
601 if (closure->distribution ==
make_string(
"beckmann", 14712237670914973463ull)) {
607 preserve_energy = (closure->distribution ==
make_string(
"multi_ggx", 16842698693386468366ull));
611 fresnel->thin_film.thickness = closure->thinfilm_thickness;
612 fresnel->thin_film.ior = closure->thinfilm_ior;
615 kg, bsdf, sd, fresnel,
rgb_to_spectrum(closure->f82), preserve_energy);
621 const uint32_t path_flag,
623 const ccl_private MicrofacetMultiGGXGlassClosure *closure,
640 bsdf->alpha_x = closure->alpha_x;
641 bsdf->alpha_y = bsdf->alpha_x;
642 bsdf->ior = closure->ior;
653 const uint32_t path_flag,
655 const ccl_private MicrofacetMultiGGXClosure *closure,
671 bsdf->alpha_x = closure->alpha_x;
672 bsdf->alpha_y = closure->alpha_y;
675 bsdf->T = closure->T;
680 if (layer_albedo !=
nullptr) {
690 const uint32_t path_flag,
706 bsdf->sigma = closure->sigma;
715 const uint32_t path_flag,
733 bsdf->roughness = closure->roughness;
738 sd->flag |= sheen_flag;
740 if (layer_albedo !=
nullptr) {
741 *layer_albedo = bsdf->weight;
749 const uint32_t path_flag,
767 bsdf->roughness = closure->roughness;
772 sd->flag |= sheen_flag;
774 if (layer_albedo !=
nullptr) {
775 *layer_albedo = bsdf->weight * closure->albedo;
782 const uint32_t path_flag,
798 bsdf->size = closure->size;
799 bsdf->smooth = closure->smooth;
806 const uint32_t path_flag,
822 bsdf->size = closure->size;
823 bsdf->smooth = closure->smooth;
875 weight *= closure->emittance;
919 for (
int i = 0;
i < 8;
i++) {
920 bsdf->colors[
i] = closure->colors[
i];
923 sd->flag |= bsdf_diffuse_ramp_setup(bsdf);
940 bsdf->exponent = closure->exponent;
947 for (
int i = 0;
i < 8;
i++) {
948 bsdf->colors[
i] = closure->colors[
i];
951 sd->flag |= bsdf_phong_ramp_setup(bsdf);
956 const uint32_t path_flag,
962 if (closure->method ==
make_string(
"burley", 186330084368958868ull)) {
965 else if (closure->method ==
make_string(
"random_walk", 11360609267673527222ull)) {
968 else if (closure->method ==
make_string(
"random_walk_skin", 3096325052680726300ull)) {
980 bssrdf->radius = closure->radius;
982 bssrdf->albedo = closure->albedo;
985 bssrdf->alpha = closure->roughness;
986 bssrdf->ior = closure->ior;
987 bssrdf->anisotropy = closure->anisotropy;
996 const uint32_t path_flag,
998 const ccl_private SubsurfaceBSSRDFClosure *closure,
1006#if OSL_LIBRARY_VERSION_CODE >= 11401
1007 bssrdf->radius = closure->radius;
1009 bssrdf->radius = closure->transmission_depth * closure->transmission_color;
1012 bssrdf->albedo = closure->albedo;
1017 bssrdf->anisotropy = closure->anisotropy;
1026 const uint32_t path_flag,
1042 bsdf->T = closure->T;
1043 bsdf->roughness1 = closure->roughness1;
1044 bsdf->roughness2 = closure->roughness2;
1045 bsdf->offset = closure->offset;
1053 const uint32_t path_flag,
1055 const ccl_private HairTransmissionClosure *closure,
1069 bsdf->T = closure->T;
1070 bsdf->roughness1 = closure->roughness1;
1071 bsdf->roughness2 = closure->roughness2;
1072 bsdf->offset = closure->offset;
1079 const uint32_t path_flag,
1096 bsdf->sigma = closure->sigma;
1097 bsdf->v = closure->v;
1098 bsdf->s = closure->s;
1099 bsdf->alpha = closure->alpha;
1100 bsdf->eta = closure->eta;
1101 bsdf->m0_roughness = closure->m0_roughness;
1103 sd->flag |= bsdf_hair_chiang_setup(sd, bsdf);
1109 const uint32_t path_flag,
1119 if (closure->r_lobe <= 0.0f && closure->tt_lobe <= 0.0f && closure->trt_lobe <= 0.0f) {
1136 bsdf->sigma = closure->sigma;
1137 bsdf->roughness = closure->roughness;
1138 bsdf->tilt = closure->tilt;
1139 bsdf->eta = closure->eta;
1140 bsdf->aspect_ratio = closure->aspect_ratio;
1142 bsdf->extra = extra;
1143 bsdf->extra->R = closure->r_lobe;
1144 bsdf->extra->TT = closure->tt_lobe;
1145 bsdf->extra->TRT = closure->trt_lobe;
1147 bsdf->extra->pixel_coverage = 1.0f;
1155 const int k1 = k0 + 1;
1156 const float radius =
mix(
1159 bsdf->extra->pixel_coverage = 0.5f * sd->dP / radius;
1162 sd->flag |= bsdf_hair_huang_setup(sd, bsdf, path_flag);
1184 const ccl_private VolumeHenyeyGreensteinClosure *closure,
1196 volume->
g = closure->g;
1206 const ccl_private VolumeFournierForandClosure *closure,
1235 volume->
g = closure->g;
1236 volume->alpha = closure->alpha;
CCL_NAMESPACE_BEGIN ccl_device ccl_private ShaderClosure * closure_alloc(ccl_private ShaderData *sd, const uint size, ClosureType type, Spectrum weight)
ccl_device_inline ccl_private ShaderClosure * bsdf_alloc(ccl_private ShaderData *sd, const int size, Spectrum weight)
ccl_device ccl_private void * closure_alloc_extra(ccl_private ShaderData *sd, const int size)
ccl_device_inline Spectrum bsdf_albedo(KernelGlobals kg, const ccl_private ShaderData *sd, const ccl_private ShaderClosure *sc, const bool reflection, const bool transmission)
CCL_NAMESPACE_BEGIN ccl_device int bsdf_ashikhmin_shirley_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_ashikhmin_velvet_setup(ccl_private VelvetBsdf *bsdf)
ccl_device int bsdf_translucent_setup(ccl_private DiffuseBsdf *bsdf)
ccl_device int bsdf_diffuse_setup(ccl_private DiffuseBsdf *bsdf)
ccl_device int bsdf_hair_reflection_setup(ccl_private HairBsdf *bsdf)
ccl_device int bsdf_hair_transmission_setup(ccl_private HairBsdf *bsdf)
ccl_device void bsdf_microfacet_setup_fresnel_f82_tint(KernelGlobals kg, ccl_private MicrofacetBsdf *bsdf, const ccl_private ShaderData *sd, ccl_private FresnelF82Tint *fresnel, const Spectrum f82_tint, const bool preserve_energy)
ccl_device int bsdf_microfacet_beckmann_glass_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_microfacet_beckmann_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device void bsdf_microfacet_setup_fresnel_constant(KernelGlobals kg, ccl_private MicrofacetBsdf *bsdf, const ccl_private ShaderData *sd, const Spectrum color)
ccl_device void bsdf_microfacet_setup_fresnel_generalized_schlick(KernelGlobals kg, ccl_private MicrofacetBsdf *bsdf, const ccl_private ShaderData *sd, ccl_private FresnelGeneralizedSchlick *fresnel, const bool preserve_energy)
ccl_device void bsdf_microfacet_setup_fresnel_conductor(KernelGlobals kg, ccl_private MicrofacetBsdf *bsdf, const ccl_private ShaderData *sd, ccl_private FresnelConductor *fresnel, const bool preserve_energy)
ccl_device void bsdf_microfacet_setup_fresnel_dielectric_tint(KernelGlobals kg, ccl_private MicrofacetBsdf *bsdf, const ccl_private ShaderData *sd, ccl_private FresnelDielectricTint *fresnel, const bool preserve_energy)
ccl_device int bsdf_microfacet_beckmann_refraction_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_microfacet_ggx_glass_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_microfacet_ggx_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_microfacet_ggx_refraction_setup(ccl_private MicrofacetBsdf *bsdf)
ccl_device int bsdf_oren_nayar_setup(const ccl_private ShaderData *sd, ccl_private OrenNayarBsdf *bsdf, const Spectrum color)
ccl_device void bsdf_ray_portal_setup(ccl_private ShaderData *sd, const Spectrum weight, const float3 position, float3 direction)
ccl_device int bsdf_sheen_setup(KernelGlobals kg, const ccl_private ShaderData *sd, ccl_private SheenBsdf *bsdf)
ccl_device int bsdf_diffuse_toon_setup(ccl_private ToonBsdf *bsdf)
ccl_device int bsdf_glossy_toon_setup(ccl_private ToonBsdf *bsdf)
CCL_NAMESPACE_BEGIN ccl_device void bsdf_transparent_setup(ccl_private ShaderData *sd, const Spectrum weight, const uint32_t path_flag)
ccl_device float3 maybe_ensure_valid_specular_reflection(ccl_private ShaderData *sd, const float3 N)
ccl_device float ior_from_F0(const float f0)
ccl_device_inline ccl_private Bssrdf * bssrdf_alloc(ccl_private ShaderData *sd, Spectrum weight)
ccl_device int bssrdf_setup(ccl_private ShaderData *sd, ccl_private Bssrdf *bssrdf, const int path_flag, ClosureType type)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
ccl_device void osl_closure_diffuse_toon_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private DiffuseToonClosure *closure, float3 *)
ccl_device void osl_closure_diffuse_ramp_setup(KernelGlobals, ccl_private ShaderData *sd, uint32_t, const float3 weight, const ccl_private DiffuseRampClosure *closure, float3 *)
ccl_device void osl_closure_fournier_forand_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t, const float3 weight, const ccl_private VolumeFournierForandClosure *closure, float3 *)
ccl_device void osl_closure_uniform_edf_setup(KernelGlobals kg, ccl_private ShaderData *sd, uint32_t, float3 weight, const ccl_private UniformEDFClosure *closure, float3 *)
ccl_device void osl_closure_sheen_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private SheenBSDFClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_microfacet_f82_tint_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private MicrofacetF82TintClosure *closure, float3 *)
ccl_device void osl_closure_ray_portal_bsdf_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t, const float3 weight, const ccl_private RayPortalBSDFClosure *closure, float3 *)
ccl_device void osl_closure_microfacet_multi_ggx_aniso_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private MicrofacetMultiGGXClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_diffuse_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private DiffuseClosure *closure, float3 *)
ccl_device void osl_closure_holdout_setup(KernelGlobals, ccl_private ShaderData *sd, uint32_t, const float3 weight, const ccl_private HoldoutClosure *, float3 *)
ccl_device void osl_closure_subsurface_bssrdf_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private SubsurfaceBSSRDFClosure *closure, float3 *)
ccl_device void osl_closure_hair_huang_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private HuangHairClosure *closure, float3 *)
ccl_device void osl_closure_absorption_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t, float3 weight, const ccl_private VolumeAbsorptionClosure *, float3 *)
ccl_device void osl_closure_bssrdf_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private BSSRDFClosure *closure, float3 *)
ccl_device void osl_closure_hair_chiang_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private ChiangHairClosure *closure, float3 *)
ccl_device void osl_closure_burley_diffuse_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, uint32_t path_flag, float3 weight, ccl_private const BurleyDiffuseBSDFClosure *closure, float3 *)
ccl_device void osl_closure_background_setup(KernelGlobals, ccl_private ShaderData *sd, uint32_t, const float3 weight, const ccl_private GenericBackgroundClosure *, float3 *)
ccl_device void osl_closure_oren_nayar_diffuse_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private OrenNayarDiffuseBSDFClosure *closure, float3 *)
ccl_device void osl_closure_reflection_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private ReflectionClosure *closure, float3 *)
ccl_device void osl_closure_dielectric_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private DielectricBSDFClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_transparent_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private TransparentClosure *, float3 *)
ccl_device void osl_closure_emission_setup(KernelGlobals kg, ccl_private ShaderData *sd, uint32_t, float3 weight, const ccl_private GenericEmissiveClosure *, float3 *)
ccl_device void osl_closure_oren_nayar_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private OrenNayarClosure *closure, float3 *)
ccl_device void osl_closure_rayleigh_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t, const float3 weight, const ccl_private VolumeRayleighClosure *, float3 *)
ccl_device_forceinline void osl_zero_albedo(float3 *layer_albedo)
ccl_device void osl_closure_refraction_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private RefractionClosure *closure, float3 *)
ccl_device void osl_closure_conductor_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private ConductorBSDFClosure *closure, float3 *)
ccl_device void osl_closure_henyey_greenstein_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t, float3 weight, const ccl_private VolumeHenyeyGreensteinClosure *closure, float3 *)
ccl_device void osl_closure_glossy_toon_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private GlossyToonClosure *closure, float3 *)
ccl_device_forceinline bool osl_closure_skip(KernelGlobals kg, const uint32_t path_flag, const int scattering)
ccl_device void osl_closure_phong_ramp_setup(KernelGlobals, ccl_private ShaderData *sd, uint32_t, const float3 weight, const ccl_private PhongRampClosure *closure, float3 *)
ccl_device void osl_closure_microfacet_multi_ggx_glass_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private MicrofacetMultiGGXGlassClosure *closure, float3 *)
ccl_device void osl_closure_ashikhmin_velvet_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private AshikhminVelvetClosure *closure, float3 *)
ccl_device void osl_closure_sheen_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private SheenClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_microfacet_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private MicrofacetClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_translucent_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private TranslucentClosure *closure, float3 *)
ccl_device void osl_closure_hair_transmission_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private HairTransmissionClosure *closure, float3 *)
ccl_device void osl_closure_hair_reflection_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private HairReflectionClosure *closure, float3 *)
ccl_device void osl_closure_generalized_schlick_bsdf_setup(KernelGlobals kg, ccl_private ShaderData *sd, const uint32_t path_flag, const float3 weight, const ccl_private GeneralizedSchlickBSDFClosure *closure, float3 *layer_albedo)
ccl_device void osl_closure_draine_setup(KernelGlobals, ccl_private ShaderData *sd, const uint32_t, const float3 weight, const ccl_private VolumeDraineClosure *closure, float3 *)
#define ccl_device_forceinline
#define kernel_data_fetch(name, index)
#define PRIMITIVE_UNPACK_SEGMENT(type)
const ThreadKernelGlobalsCPU * KernelGlobals
#define CCL_NAMESPACE_END
ccl_device void emission_setup(ccl_private ShaderData *sd, const Spectrum weight)
CCL_NAMESPACE_BEGIN ccl_device void background_setup(ccl_private ShaderData *sd, const Spectrum weight)
CCL_NAMESPACE_BEGIN ccl_device void volume_extinction_setup(ccl_private ShaderData *sd, Spectrum weight)
ccl_device_inline float object_volume_density(KernelGlobals kg, const int object)
ccl_device_inline DeviceString make_string(const char *str, const size_t hash)
@ CLOSURE_BSSRDF_BURLEY_ID
@ CLOSURE_BSSRDF_RANDOM_WALK_ID
@ CLOSURE_BSSRDF_RANDOM_WALK_SKIN_ID
@ SD_IS_VOLUME_SHADER_EVAL
ccl_device_inline Spectrum rgb_to_spectrum(const float3 rgb)
ccl_device_inline bool is_zero(const float2 a)
ccl_device_inline float3 safe_normalize_fallback(const float3 a, const float3 fallback)
ccl_device_inline float3 one_float3()
CCL_NAMESPACE_BEGIN ccl_device_inline float3 zero_float3()
closure color bssrdf(string method, normal N, vector radius, color albedo) BUILTIN
ccl_device int volume_draine_setup(ccl_private DraineVolume *volume)
ccl_device int volume_fournier_forand_setup(ccl_private FournierForandVolume *volume, float B, float IOR)
ccl_device int volume_henyey_greenstein_setup(ccl_private HenyeyGreensteinVolume *volume)
ccl_device int volume_rayleigh_setup(ccl_private RayleighVolume *volume)