55 # ifdef __PRINCIPLED__
56 if (
bssrdf->roughness != FLT_MAX) {
94 N = shader_bssrdf_normal(sd);
104 # ifdef __PRINCIPLED__
111 bsdf->roughness = FLT_MAX;
150 const int object = ss_isect.hits[0].object;
164 ray.P += ray.D * ray.tmax * 2.0f;
176 const bool use_caustics =
kernel_data.integrator.use_caustics &&
187 else if (use_raytrace_kernel) {
ccl_device_inline ccl_private ShaderClosure * bsdf_alloc(ccl_private ShaderData *sd, int size, float3 weight)
ccl_device int bsdf_diffuse_setup(ccl_private DiffuseBsdf *bsdf)
ccl_device int bsdf_principled_diffuse_setup(ccl_private PrincipledDiffuseBsdf *bsdf)
@ PRINCIPLED_DIFFUSE_LAMBERT_EXIT
#define kernel_assert(cond)
#define ccl_optional_struct_init
#define ccl_device_inline
#define CCL_NAMESPACE_END
ccl_device_forceinline int intersection_get_object_flags(KernelGlobals kg, ccl_private const Intersection *ccl_restrict isect)
ccl_device_forceinline int intersection_get_shader(KernelGlobals kg, ccl_private const Intersection *ccl_restrict isect)
const KernelGlobalsCPU *ccl_restrict KernelGlobals
#define kernel_data_fetch(name, index)
ccl_device_forceinline float differential_make_compact(const differential3 D)
ccl_device_forceinline float differential_zero_compact()
CCL_NAMESPACE_BEGIN ccl_device void integrator_volume_stack_update_for_subsurface(KernelGlobals kg, IntegratorState state, const float3 from_P, const float3 to_P)
ccl_device_inline float3 shader_bssrdf_sample_weight(ccl_private const ShaderData *ccl_restrict sd, ccl_private const ShaderClosure *ccl_restrict bssrdf_sc)
@ CLOSURE_BSSRDF_BURLEY_ID
@ PATH_RAY_SUBSURFACE_USE_FRESNEL
@ PATH_RAY_SUBSURFACE_BACKFACING
@ PATH_RAY_SUBSURFACE_DISK
@ PATH_RAY_DIFFUSE_ANCESTOR
@ PATH_RAY_SUBSURFACE_RANDOM_WALK
@ KERNEL_FEATURE_LIGHT_PASSES
@ SD_OBJECT_INTERSECTS_VOLUME
@ LABEL_SUBSURFACE_SCATTER
@ DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_SUBSURFACE
@ DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE
@ DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_MNEE
ccl_device_inline float3 one_float3()
ccl_device_inline float3 zero_float3()
ccl_device_inline void path_state_rng_load(ConstIntegratorState state, ccl_private RNGState *rng_state)
IntegratorStateCPU *ccl_restrict IntegratorState
#define INTEGRATOR_STATE_WRITE(state, nested_struct, member)
#define INTEGRATOR_STATE(state, nested_struct, member)
ccl_device_forceinline void integrator_path_next_sorted(KernelGlobals kg, IntegratorState state, const DeviceKernel current_kernel, const DeviceKernel next_kernel, const uint32_t key)
ccl_device_forceinline void integrator_state_write_isect(KernelGlobals kg, IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
CCL_NAMESPACE_BEGIN ccl_device_forceinline void integrator_state_write_ray(KernelGlobals kg, IntegratorState state, ccl_private const Ray *ccl_restrict ray)
closure color bssrdf(string method, normal N, vector radius, color albedo) BUILTIN
ccl_device_inline bool subsurface_disk(KernelGlobals kg, IntegratorState state, RNGState rng_state, ccl_private Ray &ray, ccl_private LocalIntersection &ss_isect)
ccl_device_inline bool subsurface_random_walk(KernelGlobals kg, IntegratorState state, RNGState rng_state, ccl_private Ray &ray, ccl_private LocalIntersection &ss_isect)
BLI_INLINE float D(const float *data, const int res[3], int x, int y, int z)