diff options
Diffstat (limited to 'modules/raycast/lightmap_raycaster_embree.cpp')
-rw-r--r-- | modules/raycast/lightmap_raycaster_embree.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/raycast/lightmap_raycaster_embree.cpp b/modules/raycast/lightmap_raycaster_embree.cpp index 2a66c36d53..84d9e19a3f 100644 --- a/modules/raycast/lightmap_raycaster_embree.cpp +++ b/modules/raycast/lightmap_raycaster_embree.cpp @@ -69,11 +69,12 @@ void LightmapRaycasterEmbree::filter_function(const struct RTCFilterFunctionNArg } bool LightmapRaycasterEmbree::intersect(Ray &r_ray) { - RTCIntersectContext context; - - rtcInitIntersectContext(&context); - - rtcIntersect1(embree_scene, &context, (RTCRayHit *)&r_ray); + RTCRayQueryContext context; + rtcInitRayQueryContext(&context); + RTCIntersectArguments args; + rtcInitIntersectArguments(&args); + args.context = &context; + rtcIntersect1(embree_scene, (RTCRayHit *)&r_ray, &args); return r_ray.geomID != RTC_INVALID_GEOMETRY_ID; } |