rtcIntersectNp(3)
π NAME π
rtcIntersectNp β finds the closest hits for a SOA ray stream of size N
β¨ SYNOPSIS β¨
#include <embree3/rtcore.h>
void rtcIntersectNp(
RTCScene scene,
struct RTCIntersectContext* context,
struct RTCRayHitNp* rayhit,
unsigned int N
);
πΈ DESCRIPTION πΈ
okay so bestie, rtcIntersectNp is the one that finds the closest hits for a SOA ray stream (that's the rays argument) of size N β and yes it's basically a giant ray packet, we love a big batch π
The scene argument is the scene you're tracing against. And the rayhit argument? She's special. She points to two structures of pointers, with one pointer for each ray and hit component. Each one of those pointers points to an array holding the ray or hit component data for each ray or hit. The whole point (pun intended π
) is that the individual components of the SOA ray stream do not need to be stored sequentially in memory β which is literally what makes it possible to have large varying size ray packets in SOA layout. iconic behavior honestly.
if you need the tea on how to set up and trace rays in the first place, go read Section [rtcIntersect1] π«Ά
Also important bestie, don't miss this: a ray in a ray stream is considered inactive if its tnear value is larger than its tfar value. that's the vibe check for liveness, no cap.
The stream size N can be an arbitrary positive integer β including 0 π (yes, zero is valid, she's inclusive like that). And every ray component array must be aligned to 16 bytes. fr fr, don't skip the alignment, she will not be happy about it π
π EXIT STATUS π
For performance reasons, this function does not do any error checks, so it will not set any error flags on failure. It's giving speed over safety, and honestly? she's committed to the bit.
π¦ SEE ALSO π¦
[rtcOccludedNp]
that's the whole page bestie, slay πβ¨ This was rtcIntersectNp(3) from the Embree Ray Tracing Kernels 3 docs β manual section 3, page rtcIntersectNp(3). go trace something gorgeous πππ
π¦ where this page comes from
- debian bookworm: libembree-dev 3.13.5+dfsg-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms