13 #if defined(__EMBREE__)
16 #elif defined(__METALRT__)
18 #elif defined(__KERNEL_OPTIX__)
45 # define BVH_FUNCTION_NAME bvh_intersect
46 # define BVH_FUNCTION_FEATURES BVH_POINTCLOUD
49 # if defined(__HAIR__)
50 # define BVH_FUNCTION_NAME bvh_intersect_hair
51 # define BVH_FUNCTION_FEATURES BVH_HAIR | BVH_POINTCLOUD
55 # if defined(__OBJECT_MOTION__)
56 # define BVH_FUNCTION_NAME bvh_intersect_motion
57 # define BVH_FUNCTION_FEATURES BVH_MOTION | BVH_POINTCLOUD
61 # if defined(__HAIR__) && defined(__OBJECT_MOTION__)
62 # define BVH_FUNCTION_NAME bvh_intersect_hair_motion
63 # define BVH_FUNCTION_FEATURES BVH_HAIR | BVH_MOTION | BVH_POINTCLOUD
69 const uint visibility,
82 # ifdef __OBJECT_MOTION__
86 return bvh_intersect_hair_motion(kg, ray, isect, visibility);
90 return bvh_intersect_motion(kg, ray, isect, visibility);
96 return bvh_intersect_hair(kg, ray, isect, visibility);
100 return bvh_intersect(kg, ray, isect, visibility);
105 # ifdef __BVH_LOCAL__
107 # define BVH_FUNCTION_NAME bvh_intersect_local
108 # define BVH_FUNCTION_FEATURES BVH_HAIR
111 # if defined(__OBJECT_MOTION__)
112 # define BVH_FUNCTION_NAME bvh_intersect_local_motion
113 # define BVH_FUNCTION_FEATURES BVH_MOTION | BVH_HAIR
126 local_isect->num_hits = 0;
133 return kernel_embree_intersect_local(kg, ray, local_isect, local_object, lcg_state, max_hits);
137 # ifdef __OBJECT_MOTION__
139 return bvh_intersect_local_motion(kg, ray, local_isect, local_object, lcg_state, max_hits);
142 return bvh_intersect_local(kg, ray, local_isect, local_object, lcg_state, max_hits);
148 # ifdef __SHADOW_RECORD_ALL__
150 # define BVH_FUNCTION_NAME bvh_intersect_shadow_all
151 # define BVH_FUNCTION_FEATURES BVH_POINTCLOUD
154 # if defined(__HAIR__)
155 # define BVH_FUNCTION_NAME bvh_intersect_shadow_all_hair
156 # define BVH_FUNCTION_FEATURES BVH_HAIR | BVH_POINTCLOUD
160 # if defined(__OBJECT_MOTION__)
161 # define BVH_FUNCTION_NAME bvh_intersect_shadow_all_motion
162 # define BVH_FUNCTION_FEATURES BVH_MOTION | BVH_POINTCLOUD
166 # if defined(__HAIR__) && defined(__OBJECT_MOTION__)
167 # define BVH_FUNCTION_NAME bvh_intersect_shadow_all_hair_motion
168 # define BVH_FUNCTION_FEATURES BVH_HAIR | BVH_MOTION | BVH_POINTCLOUD
181 *num_recorded_hits = 0;
188 return kernel_embree_intersect_shadow_all(
189 kg,
state, ray, visibility, max_hits, num_recorded_hits, throughput);
193 # ifdef __OBJECT_MOTION__
197 return bvh_intersect_shadow_all_hair_motion(
198 kg, ray,
state, visibility, max_hits, num_recorded_hits, throughput);
202 return bvh_intersect_shadow_all_motion(
203 kg, ray,
state, visibility, max_hits, num_recorded_hits, throughput);
209 return bvh_intersect_shadow_all_hair(
210 kg, ray,
state, visibility, max_hits, num_recorded_hits, throughput);
214 return bvh_intersect_shadow_all(
215 kg, ray,
state, visibility, max_hits, num_recorded_hits, throughput);
221 # if defined(__VOLUME__) && !defined(__VOLUME_RECORD_ALL__)
223 # define BVH_FUNCTION_NAME bvh_intersect_volume
224 # define BVH_FUNCTION_FEATURES BVH_HAIR
227 # if defined(__OBJECT_MOTION__)
228 # define BVH_FUNCTION_NAME bvh_intersect_volume_motion
229 # define BVH_FUNCTION_FEATURES BVH_MOTION | BVH_HAIR
236 const uint visibility)
242 # ifdef __OBJECT_MOTION__
244 return bvh_intersect_volume_motion(kg, ray, isect, visibility);
248 return bvh_intersect_volume(kg, ray, isect, visibility);
255 # if defined(__VOLUME__) && defined(__VOLUME_RECORD_ALL__)
257 # define BVH_FUNCTION_NAME bvh_intersect_volume_all
258 # define BVH_FUNCTION_FEATURES BVH_HAIR
261 # if defined(__OBJECT_MOTION__)
262 # define BVH_FUNCTION_NAME bvh_intersect_volume_all_motion
263 # define BVH_FUNCTION_FEATURES BVH_MOTION | BVH_HAIR
271 const uint visibility)
279 return kernel_embree_intersect_volume(kg, ray, isect, max_hits, visibility);
283 # ifdef __OBJECT_MOTION__
285 return bvh_intersect_volume_all_motion(kg, ray, isect, max_hits, visibility);
289 return bvh_intersect_volume_all(kg, ray, isect, max_hits, visibility);
295 # undef BVH_NAME_JOIN
296 # undef BVH_NAME_EVAL
297 # undef BVH_FUNCTION_FULL_NAME
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN ccl_device_inline bool intersection_ray_valid(ccl_private const Ray *ray)
const KernelGlobalsCPU *ccl_restrict KernelGlobals
ccl_device_intersect bool scene_intersect(KernelGlobals kg, ccl_private const Ray *ray, const uint visibility, ccl_private Intersection *isect)
#define ccl_device_intersect
ccl_device_intersect bool kernel_embree_intersect(KernelGlobals kg, ccl_private const Ray *ray, const uint visibility, ccl_private Intersection *isect)
IntegratorShadowStateCPU *ccl_restrict IntegratorShadowState