1rtcForwardIntersect4/8/16/EEmxb(r3e)e Ray Tracing KernretlcsFo4rwardIntersect4/8/16/Ex(3)
2
3
4
5 NAME
6 rtcForwardIntersect4/8/16/Ex - forwards a ray packet to new scene
7 from user geometry callback
8
9 SYNOPSIS
10 #include <embree4/rtcore.h>
11
12 void rtcForwardIntersect4(
13 void int* valid,
14 const struct RTCIntersectFunctionNArguments* args,
15 RTCScene scene,
16 struct RTCRay4* ray,
17 unsigned int instID
18 );
19
20 void rtcForwardIntersect8(
21 void int* valid,
22 const struct RTCIntersectFunctionNArguments* args,
23 RTCScene scene,
24 struct RTCRay8* ray,
25 unsigned int instID
26 );
27
28 void rtcForwardIntersect16(
29 void int* valid,
30 const struct RTCIntersectFunctionNArguments* args,
31 RTCScene scene,
32 struct RTCRay16* ray,
33 unsigned int instID,
34 unsigned int instPrimID
35 );
36
37 void rtcForwardIntersect4Ex(
38 void int* valid,
39 const struct RTCIntersectFunctionNArguments* args,
40 RTCScene scene,
41 struct RTCRay4* ray,
42 unsigned int instID,
43 unsigned int instPrimID
44 );
45
46 void rtcForwardIntersect8Ex(
47 void int* valid,
48 const struct RTCIntersectFunctionNArguments* args,
49 RTCScene scene,
50 struct RTCRay8* ray,
51 unsigned int instID,
52 unsigned int instPrimID
53 );
54
55 void rtcForwardIntersect16Ex(
56 void int* valid,
57 const struct RTCIntersectFunctionNArguments* args,
58 RTCScene scene,
59 struct RTCRay16* ray,
60 unsigned int instID,
61 unsigned int instPrimID
62 );
63
64 DESCRIPTION
65 The rtcForwardIntersect4/8/16 and rtcForwardIntersect4/8/16Ex functions
66 forward the traversal of a transformed ray packet (ray argument) into a
67 scene (scene argument) from a user geometry callback. The function can
68 only get invoked from a user geometry callback for a ray traversal ini‐
69 tiated with the rtcIntersect4/8/16 function. The callback arguments
70 structure of the callback invokation has to get passed to the ray for‐
71 warding (args argument). The user geometry callback should instantly
72 terminate after invoking the rtcForwardIntersect4/8/16/Ex function.
73
74 Only the ray origin and ray direction members of the ray argument are
75 used for forwarding, all additional ray properties are inherited from
76 the initial ray traversal invokation of rtcIntersect4/8/16.
77
78 The implementation of the rtcForwardIntersect4/8/16 function recursive‐
79 ly continues the ray traversal into the specified scene and pushes the
80 provided instance ID (instID argument) to the instance ID stack. Hit
81 information is updated into the ray hit structure passed to the origi‐
82 nal rtcIntersect4/8/16 invokation.
83
84 This function can get used to implement user defined instancing using
85 user geometries, e.g. by transforming the ray in a special way, and/or
86 selecting between different scenes to instantiate.
87
88 For user defined instance arrays, the rtcForwardIntersect4/8/16Ex vari‐
89 ant has an additional instPrimID argument which is pushed to the in‐
90 stance primitive ID stack. Instance primitive IDs identify which in‐
91 stance of an instance array was hit.
92
93 When using Embree on the CPU it is possible to recursively invoke
94 rtcIntersect4/8/16 directly from a user geometry callback. However,
95 when SYCL is used, recursively tracing rays is not directly supported,
96 and the rtcForwardIntersect4/8/16 function must be used.
97
98 For rtcForwardIntersect4 the ray packet must be aligned to 16 bytes,
99 for rtcForwardIntersect8 the alignment must be 32 bytes, and for rtc‐
100 ForwardIntersect16 the alignment must be 64 bytes.
101
102 EXIT STATUS
103 For performance reasons this function does not do any error checks,
104 thus will not set any error flags on failure.
105
106 SEE ALSO
107 [rtcIntersect4/8/16]
108
109
110
111 rtcForwardIntersect4/8/16/Ex(3)