rtcInterpolateN(3)

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

πŸ’– rtcInterpolateN πŸ’–

okay bestie, welcome to the rtcInterpolateN(3) page from the Embree Ray Tracing Kernels 3 era, and no, it's not the glow-up twin of rtcInterpolate β€” it's literally the same energy but it does N of them at once. the way that this function is just out here doing bulk interpolations like it's nothing?? iconic. ✨


🌸 NAME 🌸

rtcInterpolateN β€” performs N interpolations of vertex attribute data

like. N. not one. N. slay. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <embree3/rtcore.h>

struct RTCInterpolateNArguments
{
  RTCGeometry geometry;
  const void* valid;
  const unsigned int* primIDs;
  const float* u;
  const float* v;
  unsigned int N;
  enum RTCBufferType bufferType;
  unsigned int bufferSlot;
  float* P;
  float* dPdu;
  float* dPdv;
  float* ddPdudu;
  float* ddPdvdv;
  float* ddPdudv;
  unsigned int valueCount;
};

void rtcInterpolateN(
  const struct RTCInterpolateNArguments* args
);

not me showing you the whole struct like it's a group chat screenshot 🫢 every field is exactly where it's supposed to be, don't touch them.


πŸ¦‹ DESCRIPTION πŸ¦‹

so rtcInterpolateN is giving very much "rtcInterpolate but make it a batch". it's similar to rtcInterpolate, but instead of one lil interpolation it does N many interpolations at once. main character efficiency. πŸ‘‘

and because it's doing the most, it also needs an array of u/v coordinates plus a valid mask (that's the valid parameter) that says which of those coordinates are actually valid. bestie, listen closely:

  • the valid mask points to N integers
  • a value of -1 means valid βœ…
  • a value of 0 means invalid ❌
  • if the valid pointer is NULL, then all elements are considered valid (no cap)

the destination arrays get filled in structure of array (SOA) layout β€” so it's all lined up in its little rows, very organized, very demure. πŸŽ€

⚠️ and the rule you CANNOT skip: the value N must be divisible by 4. not "should be". must. do the math before you ship it or it's over for you fr fr 😭

one more thing β€” if you wanna use rtcInterpolateN on a geometry, all changes to that geometry must be properly committed using rtcCommitGeometry. commit your changes, commit to the bit, commit to the geometry. that's the vibe check. πŸ’…


πŸ’€ EXIT STATUS πŸ’€

for performance reasons this function does not do any error checks, so it will not set any error flags on failure.

🚨 translation: it is not going to hold your hand. no warnings, no error flags, nothing. if something goes wrong you get silence and vibes. check your own inputs, bestie, it's giving self-responsibility. πŸ™ˆ

🌈 SEE ALSO 🌈

  • [rtcInterpolate]

and that's the page!! πŸŽ€ this whole thing lives in the Embree Ray Tracing Kernels 3 manual, under the name rtcInterpolateN(3), and yeah that's literally the same title as the header because manpages love symmetry. go interpolate something, but like, N of them. periodt. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from