Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/intersect_closest.h
| /* SPDX-License-Identifier: Apache-2.0 | /* SPDX-License-Identifier: Apache-2.0 | ||||
| * Copyright 2011-2022 Blender Foundation */ | * Copyright 2011-2022 Blender Foundation */ | ||||
| #pragma once | #pragma once | ||||
| #include "kernel/camera/projection.h" | #include "kernel/camera/projection.h" | ||||
| #include "kernel/film/light_passes.h" | #include "kernel/film/light_passes.h" | ||||
| #include "kernel/integrator/guiding.h" | #include "kernel/integrator/guiding.h" | ||||
| #include "kernel/integrator/path_state.h" | #include "kernel/integrator/path_state.h" | ||||
| #include "kernel/integrator/shadow_catcher.h" | #include "kernel/integrator/shadow_catcher.h" | ||||
| #include "kernel/light/light.h" | |||||
| #include "kernel/geom/geom.h" | #include "kernel/geom/geom.h" | ||||
| #include "kernel/light/light.h" | |||||
| #include "kernel/bvh/bvh.h" | #include "kernel/bvh/bvh.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| ccl_device_forceinline bool integrator_intersect_terminate(KernelGlobals kg, | ccl_device_forceinline bool integrator_intersect_terminate(KernelGlobals kg, | ||||
| IntegratorState state, | IntegratorState state, | ||||
| const int shader_flags) | const int shader_flags) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | if (kernel_data.integrator.use_caustics) { | ||||
| if (from_caustic_caster && has_receiver_ancestor) | if (from_caustic_caster && has_receiver_ancestor) | ||||
| INTEGRATOR_STATE_WRITE(state, path, mnee) |= PATH_MNEE_CULL_LIGHT_CONNECTION; | INTEGRATOR_STATE_WRITE(state, path, mnee) |= PATH_MNEE_CULL_LIGHT_CONNECTION; | ||||
| if (from_caustic_receiver) | if (from_caustic_receiver) | ||||
| INTEGRATOR_STATE_WRITE(state, path, mnee) |= PATH_MNEE_RECEIVER_ANCESTOR; | INTEGRATOR_STATE_WRITE(state, path, mnee) |= PATH_MNEE_RECEIVER_ANCESTOR; | ||||
| } | } | ||||
| #endif /* __MNEE__ */ | #endif /* __MNEE__ */ | ||||
| /* Light intersection for MIS. */ | /* Light intersection for MIS. */ | ||||
| if (kernel_data.integrator.use_lamp_mis) { | if (kernel_data.integrator.use_light_mis) { | ||||
| /* NOTE: if we make lights visible to camera rays, we'll need to initialize | /* NOTE: if we make lights visible to camera rays, we'll need to initialize | ||||
| * these in the path_state_init. */ | * these in the path_state_init. */ | ||||
| const int last_type = INTEGRATOR_STATE(state, isect, type); | const int last_type = INTEGRATOR_STATE(state, isect, type); | ||||
| hit = lights_intersect( | hit = lights_intersect( | ||||
| kg, state, &ray, &isect, last_isect_prim, last_isect_object, last_type, path_flag) || | kg, state, &ray, &isect, last_isect_prim, last_isect_object, last_type, path_flag) || | ||||
| hit; | hit; | ||||
| } | } | ||||
| Show All 9 Lines | |||||