Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/osl/osl_closures.cpp
| Show All 34 Lines | |||||
| #include "kernel/osl/osl_closures.h" | #include "kernel/osl/osl_closures.h" | ||||
| #include "kernel/osl/osl_shader.h" | #include "kernel/osl/osl_shader.h" | ||||
| #include "util/util_math.h" | #include "util/util_math.h" | ||||
| #include "util/util_param.h" | #include "util/util_param.h" | ||||
| // clang-format off | // clang-format off | ||||
| #include "kernel/device/cpu/compat.h" | |||||
| #include "kernel/device/cpu/globals.h" | |||||
| #include "kernel/kernel_types.h" | #include "kernel/kernel_types.h" | ||||
| #include "kernel/kernel_compat_cpu.h" | |||||
| #include "kernel/split/kernel_split_data_types.h" | |||||
| #include "kernel/kernel_globals.h" | |||||
| #include "kernel/kernel_montecarlo.h" | #include "kernel/kernel_montecarlo.h" | ||||
| #include "kernel/kernel_random.h" | #include "kernel/kernel_random.h" | ||||
| #include "kernel/closure/alloc.h" | #include "kernel/closure/alloc.h" | ||||
| #include "kernel/closure/bsdf_util.h" | #include "kernel/closure/bsdf_util.h" | ||||
| #include "kernel/closure/bsdf_ashikhmin_velvet.h" | #include "kernel/closure/bsdf_ashikhmin_velvet.h" | ||||
| #include "kernel/closure/bsdf_diffuse.h" | #include "kernel/closure/bsdf_diffuse.h" | ||||
| #include "kernel/closure/bsdf_microfacet.h" | #include "kernel/closure/bsdf_microfacet.h" | ||||
| ▲ Show 20 Lines • Show All 440 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* BSDF Closure */ | /* BSDF Closure */ | ||||
| bool CBSDFClosure::skip(const ShaderData *sd, int path_flag, int scattering) | bool CBSDFClosure::skip(const ShaderData *sd, int path_flag, int scattering) | ||||
| { | { | ||||
| /* caustic options */ | /* caustic options */ | ||||
| if ((scattering & LABEL_GLOSSY) && (path_flag & PATH_RAY_DIFFUSE)) { | if ((scattering & LABEL_GLOSSY) && (path_flag & PATH_RAY_DIFFUSE)) { | ||||
| KernelGlobals *kg = sd->osl_globals; | const KernelGlobals *kg = sd->osl_globals; | ||||
| if ((!kernel_data.integrator.caustics_reflective && (scattering & LABEL_REFLECT)) || | if ((!kernel_data.integrator.caustics_reflective && (scattering & LABEL_REFLECT)) || | ||||
| (!kernel_data.integrator.caustics_refractive && (scattering & LABEL_TRANSMIT))) { | (!kernel_data.integrator.caustics_refractive && (scattering & LABEL_TRANSMIT))) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 497 Lines • Show Last 20 Lines | |||||