rtcOccluded4/8/16(3)
β¨ rtcOccluded4/8/16 β finds any hits for a ray packet β¨
okay bestie, welcome to the Embree Ray Tracing Kernels 4 page for rtcOccluded4/8/16 π this is the one where you ask a whole squad of rays at once "hey... did literally anything get in your way?" and you get a yes/no back. no hit data, no tea, just vibes. let's go π¦
πΈ SYNOPSIS πΈ
#include <embree4/rtcore.h>
void rtcOccluded4(
const int* valid,
RTCScene scene,
struct RTCRay4* ray,
struct RTCOccludedArguments* args = NULL
);
void rtcOccluded8(
const int* valid,
RTCScene scene,
struct RTCRay8* ray,
struct RTCOccludedArguments* args = NULL
);
void rtcOccluded16(
const int* valid,
RTCScene scene,
struct RTCRay16* ray,
struct RTCOccludedArguments* args = NULL
);
π DESCRIPTION π
So like. The rtcOccluded4/8/16 functions check, for each active ray in a ray packet of size 4, 8, or 16 (that's the ray argument, obvi), whether there is any hit with the scene (the scene argument, duh). It's giving "is the path blocked, yes or no" β that's the whole entire job π
The optional arguments struct (the args argument) can be used for advanced use cases β see the section [rtcInitOccludedArguments] for more details. And if you want the full lore on occlusion rays, how to set them up, how to trace them, all of it, go read Section [rtcOccluded1]. iykyk π§
A ray valid mask must be provided (thevalidargument), and it stores one 32-bit integer per ray in the packet β-1means valid,0means invalid. Only active rays get processed, and the hit data of inactive rays is not changed. like, not touched. left exactly as you gave them. periodt.
Alignment check, bestie, do not skip this one π
- For
rtcOccluded4the ray packet must be aligned to 16 bytes. - For
rtcOccluded8the alignment must be 32 bytes. - For
rtcOccluded16the alignment must be 64 bytes.
The rtcOccluded4, rtcOccluded8 and rtcOccluded16 functions may change the ray packet size and ray order when calling back into intersect filter functions or user geometry callbacks. yep. they can shuffle your lil rays around π« under some conditions though, the application can assume packets stay intakt, and you can determine that by querying the RTC_DEVICE_PROPERTY_NATIVE_RAY4_SUPPORTED, RTC_DEVICE_PROPERTY_NATIVE_RAY8_SUPPORTED, and RTC_DEVICE_PROPERTY_NATIVE_RAY16_SUPPORTED properties through the rtcGetDeviceProperty function. See [rtcGetDeviceProperty] for more information. go check before you assume, fr fr π
π EXIT STATUS π
For performance reasons this function does not do any error checks, thus it will not set any error flags on failure. it's fast because it does not care. iconic behaviour honestly but also pls be careful π
π SEE ALSO π
- [rtcOccluded1]
- [rtcIntersect4/8/16]
- [rtcInitOccludedArguments]
and that's the whole page, bestie π this was rtcOccluded4/8/16 from the Embree Ray Tracing Kernels 4 set β mwah, slay, go trace something gorgeous ππ
β¨
π¦ where this page comes from
- ubuntu stonking: libembree-dev 4.4.1+dfsg-2ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms