rtcIntersectNp(3)

πŸ“¦ version 3.13.5, in epel 9, fedora 43, fedora 44

πŸ’– 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