rtcSetGeometryMask(3)

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

πŸ’– rtcSetGeometryMask(3) πŸ’–

okay bestie, gather round β€” this is a page straight out of the Embree Ray Tracing Kernels 3 manual, and it's about the lil function that gives your geometry a mask. yes, like a costume party. but for rays. 🎭✨


πŸŽ€ NAME πŸŽ€

rtcSetGeometryMask β€” sets the geometry mask πŸ’…


✨ SYNOPSIS ✨

#include <embree3/rtcore.h>

void rtcSetGeometryMask(
  RTCGeometry geometry,
  unsigned int mask
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the rtcSetGeometryMask function sets a 32-bit geometry mask (that's the mask argument, babes) for the geometry you point at with the geometry argument. two args, one vibe. 🫢

and here's the tea: this geometry mask gets used together with the ray mask that's stashed inside the mask field of the ray. the primitives of the geometry are only hit by the ray if the bitwise and operation of the geometry mask with the ray mask is not 0. literally that's the whole rule. no cap. πŸ’€

what's it for tho? it's giving selective. you can use this feature to disable selected geometries for specifically tagged rays β€” like, say, turning off shadow casting for certain geometries. iconic behavior honestly. 🌸

⚠️ important lil caveat bestie: ray masks are disabled in Embree by default at compile time. you turn them on through the EMBREE_RAY_MASK parameter in CMake. πŸ”§

and if you're sitting there like "are they even on??" β€” you can query whether ray masks are enabled by querying the RTC_DEVICE_PROPERTY_RAY_MASK_SUPPORTED device property using rtcGetDeviceProperty. vibe check your device, periodt. πŸ‘‘


πŸ’€ EXIT STATUS πŸ’€

on failure an error code is set that you can go query with rtcGetDeviceError. so if something's off, that's where the receipts are. 🧾


🌈 SEE ALSO 🌈

  • [RTCRay]
  • [rtcGetDeviceProperty]

and that's the whole page, gorgeous. this was rtcSetGeometryMask(3) from the Embree Ray Tracing Kernels 3 manual β€” source and version included, no date on the original footer so I'm not gonna make one up πŸ’… β€” mwah, go mask something. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from