.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "rtcForwardOccluded4/8/16/Ex" "3" "" "" "Embree Ray Tracing Kernels 4"
.hy
.SS NAME
.IP
.nf
\f[C]
rtcForwardOccluded4/8/16/Ex - forwards a ray packet to new scene
  from user geometry callback
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree4/rtcore.h>

void rtcForwardOccluded4(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay4* ray,
  unsigned int instID
);

void rtcForwardOccluded8(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay8* ray,
  unsigned int instID
);

void rtcForwardOccluded16(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay16* ray,
  unsigned int instID
);

void rtcForwardOccluded4Ex(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay4* ray,
  unsigned int instID,
  unsigned int instPrimID
);

void rtcForwardOccluded8Ex(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay8* ray,
  unsigned int instID,
  unsigned int instPrimID
);

void rtcForwardOccluded16Ex(
  void int* valid,
  const struct RTCOccludedFunctionNArguments* args,
  RTCScene scene,
  struct RTCRay16* ray,
  unsigned int instID,
  unsigned int instPrimID
);
\f[R]
.fi
.SS DESCRIPTION
.PP
The \f[C]rtcForwardOccluded4/8/16\f[R] and
\f[C]rtcForwardOccluded4/8/16Ex\f[R] functions forward the traversal of
a transformed ray packet (\f[C]ray\f[R] argument) into a scene
(\f[C]scene\f[R] argument) from a user geometry callback.
The function can only get invoked from a user geometry callback for a
ray traversal initiated with the \f[C]rtcOccluded4/8/16\f[R] function.
The callback arguments structure of the callback invokation has to get
passed to the ray forwarding (\f[C]args\f[R] argument).
The user geometry callback should instantly terminate after invoking the
\f[C]rtcForwardOccluded4/8/16/Ex\f[R] function.
.PP
Only the ray origin and ray direction members of the ray argument are
used for forwarding, all additional ray properties are inherited from
the initial ray traversal invokation of \f[C]rtcOccluded4/8/16\f[R].
.PP
The implementation of the \f[C]rtcForwardOccluded4/8/16\f[R] function
recursively continues the ray traversal into the specified scene and
pushes the provided instance ID (\f[C]instID\f[R] argument) to the
instance ID stack.
Hit information is updated into the ray structure passed to the original
\f[C]rtcOccluded4/8/16\f[R] invokation.
.PP
This function can get used to implement user defined instancing using
user geometries, e.g.\ by transforming the ray in a special way, and/or
selecting between different scenes to instantiate.
.PP
For user defined instance arrays, the
\f[C]rtcForwardIntersect4/8/16Ex\f[R] variant has an additional
\f[C]instPrimID\f[R] argument which is pushed to the instance primitive
ID stack.
Instance primitive IDs identify which instance of an instance array was
hit.
.PP
When using Embree on the CPU it is possible to recursively invoke
\f[C]rtcOccluded4/8/16\f[R] directly from a user geometry callback.
However, when SYCL is used, recursively tracing rays is not directly
supported, and the \f[C]rtcForwardOccluded4/8/16\f[R] function must be
used.
.PP
For \f[C]rtcForwardOccluded4\f[R] the ray packet must be aligned to 16
bytes, for \f[C]rtcForwardOccluded8\f[R] the alignment must be 32 bytes,
and for \f[C]rtcForwardOccluded16\f[R] the alignment must be 64 bytes.
.SS EXIT STATUS
.PP
For performance reasons this function does not do any error checks, thus
will not set any error flags on failure.
.SS SEE ALSO
.PP
[rtcOccluded4/8/16]
