RTCFORWARDOCCLUDED4(3embree4)
π rtcForwardOccluded4/8/16/Ex(3) π
okay bestie, buckle up, because we're about to talk about rtcForwardOccluded4/8/16/Ex β that's the Embree Ray Tracing Kernels 4 manual page, and she's lowkey iconic. β¨
πΈ NAME πΈ
rtcForwardOccluded4/8/16/Ex β forwards a ray packet to new scene from user geometry callback π¦
β¨ SYNOPSIS β¨
first things first, you gotta bring in the goods:
#include <embree4/rtcore.h>
then, the whole girl squad β six functions, all serving:
void rtcForwardOccluded4(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
unsigned int instID
);
void rtcForwardOccluded8(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
unsigned int instID
);
void rtcForwardOccluded16(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
unsigned int instID
);
void rtcForwardOccluded4Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay4* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardOccluded8Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay8* ray,
unsigned int instID,
unsigned int instPrimID
);
void rtcForwardOccluded16Ex(
void int* valid,
const struct RTCOccludedFunctionNArguments* args,
RTCScene scene,
struct RTCRay16* ray,
unsigned int instID,
unsigned int instPrimID
);
π DESCRIPTION π
so, the tea: rtcForwardOccluded4/8/16 and rtcForwardOccluded4/8/16Ex are the functions that forward the traversal of a transformed ray packet (that's the ray argument) into a scene (that's the scene argument), and they do it from a user geometry callback. π
but bestie, there are rules. this function can only get invoked from a user geometry callback for a ray traversal that was initiated with the rtcOccluded4/8/16 function. and you have to pass the callback arguments structure of the callback invocation to the ray forwarding β that's the args argument, don't skip her. π
and listen β your user geometry callback should instantly terminate after invoking the rtcForwardOccluded4/8/16/Ex function. no lingering, no extra side quests. periodt. π
only the ray origin and ray direction members of the ray argument get used for forwarding, okay? all the other ray properties are inherited from the initial ray traversal invocation of rtcOccluded4/8/16. so don't come for her with extra baggage, she's not taking it. π
the implementation of rtcForwardOccluded4/8/16 recursively continues the ray traversal into the specified scene, and pushes the provided instance ID (the instID argument) onto the instance ID stack. hit information gets updated into the ray structure that was passed to the original rtcOccluded4/8/16 invocation. π
this function can get used to implement user defined instancing using user geometries β like, for example, by transforming the ray in a special way, and/or selecting between different scenes to instantiate. main character behavior honestly. π
and for user defined instance arrays, the rtcForwardIntersect4/8/16Ex variant has an additional instPrimID argument, which gets pushed onto the instance primitive ID stack. instance primitive IDs identify which instance of an instance array was hit. iykyk. π
now here's a thing: when you're using Embree on the CPU, it is possible to recursively invoke rtcOccluded4/8/16 directly from a user geometry callback. however β and this is the plot twist π β when SYCL is used, recursively tracing rays is not directly supported, and the rtcForwardOccluded4/8/16 function must be used. no cap.
last but not least, the alignment drama: β¨
- for
rtcForwardOccluded4the ray packet must be aligned to 16 bytes - for
rtcForwardOccluded8the alignment must be 32 bytes - for
rtcForwardOccluded16the alignment must be 64 bytes
align your packets or she will simply not. π§
π₯ EXIT STATUS π₯
okay so for performance reasons this function does not do any error checks, which means it will not set any error flags on failure. she's fast, she's unbothered, she's not checking your work. π
π«Ά SEE ALSO π«Ά
[rtcOccluded4/8/16]
and that's the whole page, bestie!! mwah π this was rtcForwardOccluded4/8/16/Ex(3) from the Embree Ray Tracing Kernels 4 docs, dated 4/8/16/Ex(3) β stay aligned, stay iconic, and go forward those rays. πβ¨π
π¦ where this page comes from
- alpine 3.24: embree-doc 4.4.1-r0 Β· Apache-2.0
- arch rolling: embree 4.4.1-1 Β· Apache-2.0
- fedora 43: embree 4.4.1-1.fc43 Β· Apache-2.0
- fedora 44: embree 4.4.1-1.fc44 Β· Apache-2.0
- nixpkgs unstable: embree 4.4.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms