1rtcForwardOccluded1/Ex(3)Embree Ray Tracing Kernels 4rtcForwardOccluded1/Ex(3)
2
3
4
5 NAME
6 rtcForwardOccluded1/Ex - forwards a single ray to new scene
7 from user geometry callback
8
9 SYNOPSIS
10 #include <embree4/rtcore.h>
11
12 void rtcForwardOccluded1(
13 const struct RTCOccludedFunctionNArguments* args,
14 RTCScene scene,
15 struct RTCRay* ray,
16 unsigned int instID
17 );
18
19 void rtcForwardOccluded1(
20 const struct RTCOccludedFunctionNArguments* args,
21 RTCScene scene,
22 struct RTCRay* ray,
23 unsigned int instID,
24 unsigned int instPrimID
25 );
26
27 DESCRIPTION
28 The rtcForwardOccluded1 and rtcForwardOccluded1Ex functions forward the
29 traversal of a transformed ray (ray argument) into a scene (scene argu‐
30 ment) from a user geometry callback. The function can only get invoked
31 from a user geometry callback for a ray traversal initiated with the
32 rtcOccluded1 function. The callback arguments structure of the call‐
33 back invokation has to get passed to the ray forwarding (args argu‐
34 ment). The user geometry callback should instantly terminate after in‐
35 voking the rtcForwardOccluded1/Ex function.
36
37 Only the ray origin and ray direction members of the ray argument are
38 used for forwarding, all additional ray properties are inherited from
39 the initial ray traversal invokation of rtcOccluded1.
40
41 The implementation of the rtcForwardOccluded1 function recursively con‐
42 tinues the ray traversal into the specified scene and pushes the pro‐
43 vided instance ID (instID argument) to the instance ID stack. Hit in‐
44 formation is updated into the ray structure passed to the original rt‐
45 cOccluded1 invokation.
46
47 This function can get used to implement user defined instancing using
48 user geometries, e.g. by transforming the ray in a special way, and/or
49 selecting between different scenes to instantiate.
50
51 For user defined instance arrays, the rtcForwardIntersect1Ex variant
52 has an additional instPrimID argument which is pushed to the instance
53 primitive ID stack. Instance primitive IDs identify which instance of
54 an instance array was hit.
55
56 When using Embree on the CPU it is possible to recursively invoke rt‐
57 cOccluded1 directly from a user geometry callback. However, when SYCL
58 is used, recursively tracing rays is not directly supported, and the
59 rtcForwardOccluded1/Ex function must be used.
60
61 The ray structure must be aligned to 16 bytes.
62
63 EXIT STATUS
64 For performance reasons this function does not do any error checks,
65 thus will not set any error flags on failure.
66
67 SEE ALSO
68 [rtcOccluded1], [RTCRay]
69
70
71
72 rtcForwardOccluded1/Ex(3)