rtcSetSceneFlags(3)

✨ rtcSetSceneFlags ✨

okay so bestie, welcome to the rtcSetSceneFlags page πŸ’– this is one of the Embree Ray Tracing Kernels manual pages (it's in section 3 of the manual, iykyk) and it's literally just about telling your scene how to behave. let's get into it 🫢


🌸 NAME 🌸

rtcSetSceneFlags β€” sets the flags for the scene πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <embree4/rtcore.h>

enum RTCSceneFlags
{
  RTC_SCENE_FLAG_NONE                    = 0,
  RTC_SCENE_FLAG_DYNAMIC                 = (1 << 0),
  RTC_SCENE_FLAG_COMPACT                 = (1 << 1),
  RTC_SCENE_FLAG_ROBUST                  = (1 << 2),
  RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS = (1 << 3)
};

void rtcSetSceneFlags(RTCScene scene, enum RTCSceneFlags flags);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the rtcSetSceneFlags function sets the scene flags β€” that's the flags argument β€” for the scene you pass in (the scene argument, obviously πŸ’€). here are all the possible scene flags, no gatekeeping:

  • RTC_SCENE_FLAG_NONE β€” no flags set. like, none. zero. the blank slate vibe ✨
  • RTC_SCENE_FLAG_DYNAMIC β€” gives you better build performance for dynamic scenes (but also higher memory consumption 😭 tradeoffs are real, bestie)
  • RTC_SCENE_FLAG_COMPACT β€” uses compact acceleration structures and avoids algorithms that consume much memory. it's giving "small bag, big trip" πŸŽ€
  • RTC_SCENE_FLAG_ROBUST β€” uses acceleration structures that allow for robust traversal, and avoids optimizations that reduce arithmetic accuracy. this mode is typically used for avoiding artifacts caused by rays shooting through edges of neighboring primitives πŸ‘‘ like, no more ugly visual glitches, periodt
  • RTC_SCENE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS β€” enables scene support for filter functions passed as argument to the traversal functions. see Section [rtcInitIntersectArguments] and [rtcInitOccludedArguments] for more details πŸ“š

and the serve here? you can enable multiple flags at once using an or operation, e.g. RTC_SCENE_FLAG_COMPACT | RTC_SCENE_FLAG_ROBUST πŸ”₯ stack them, babe.


πŸ’€ EXIT STATUS πŸ’€

if it fails, an error code gets set and you can go query it with rtcGetDeviceError. so like, check on it. it will tell you what went wrong fr fr πŸ™ˆ


🌈 SEE ALSO 🌈

[rtcGetSceneFlags]


and that's the whole page, bestie, you ate it πŸ’…

this was rtcSetSceneFlags(3) from the Embree Ray Tracing Kernels 4 manual β€” that's the source and version right there β€” and it's dated like every good manpage, so go forth and set those flags 🧚

πŸ“¦ where this page comes from