rtcOccluded1(3)
π rtcOccluded1 π
okay so bestie, welcome to rtcOccluded1, page 3 of the Embree Ray Tracing Kernels 3 manual. she's short, she's fast, she's iconic. let's get into it π¦
β¨ NAME β¨
rtcOccluded1 β finds any hit for a single ray π
β¨ SYNOPSIS β¨
#include <embree3/rtcore.h>
void rtcOccluded1(
RTCScene scene,
struct RTCIntersectContext* context,
struct RTCRay* ray
);
β¨ DESCRIPTION β¨
so like, rtcOccluded1 takes one single ray (that's the ray argument, bestie) and checks whether there's any hit at all with the scene (that's the scene argument, obviously π
).
before you call her, you GOTTA set up your ray, no skipping steps:
- the ray origin β that's the
orgray member π - the ray direction β the
dirray member π― - the ray segment β the
tnearandtfarray members βοΈ - and the ray flags β set those to
0, that's theflagsray member π©
if your scene has motion blur geometries, you also have to initialize the ray time β that's the time ray member β to a value in the range [0, 1] β°
and if ray masks were enabled at compile time, then yeah, the ray mask (the mask ray member) has to be initialized too π
also the ray segment must be in the range [0, β] β so ranges that start behind the ray origin are not valid, but ranges can totally reach out to infinity, she's flexible like that β¨
if you want the full ray layout tea, go check out Section [RTCRay] π«Ά
when no intersection is found, the ray data is not updated β she leaves it alone, no notes. but the moment a hit is found, the tfar component of the ray gets set to -inf π that's the whole point, that's the signal.
okay and here's the part where we keep it real: the implementation makes no guarantees that primitives whose hit distance is exactly at (or very close to) tnear or tfar are hit or missed. it's giving "boundary, we don't know her." π so:
- if you want to exclude intersections at
tnear, just pass a slightly enlargedtnear - if you want to include intersections at
tfar, pass a slightly enlargedtfar
and PLEASE remember: the ray must be aligned to 16 bytes. no cap. π₯
β¨ EXIT STATUS β¨
for performance reasons this function does no error checks at all β so on failure it will not set any error flags. she's too busy being fast for that π
β¨ SEE ALSO β¨
- [rtcOccluded1]
- [RTCRay]
okay that's the whole page, you ate it, you understood it, periodt π this was rtcOccluded1(3) from the Embree Ray Tracing Kernels 3 manual, and yes she really does put her own name in the footer again because she's the main character πβ¨ bye bestie ππ¦πΈ
π¦ where this page comes from
- epel 9: embree 3.13.5-4.el9 Β· Apache-2.0
- fedora 43: embree3 3.13.5-9.fc41 Β· Apache-2.0
- fedora 44: embree3 3.13.5-16.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms