.\" Automatically generated by Pandoc 3.1.11.1 .\" .TH "rtcSetGeometryOccludedFilterFunction" "3" "" "" "Embree Ray Tracing Kernels 4" .SS NAME .IP .EX rtcSetGeometryOccludedFilterFunction \- sets the occlusion filter for the geometry .EE .SS SYNOPSIS .IP .EX #include void rtcSetGeometryOccludedFilterFunction( RTCGeometry geometry, RTCFilterFunctionN filter ); .EE .SS DESCRIPTION The \f[CR]rtcSetGeometryOccludedFilterFunction\f[R] function registers an occlusion filter callback function (\f[CR]filter\f[R] argument) for the specified geometry (\f[CR]geometry\f[R] argument). .PP Only a single callback function can be registered per geometry, and further invocations overwrite the previously set callback function. Passing \f[CR]NULL\f[R] as function pointer disables the registered callback function. .PP The registered occlusion filter function is invoked for every hit encountered during the \f[CR]rtcOccluded\f[R]\-type ray queries and can accept or reject that hit. The feature can be used to define a silhouette for a primitive and reject hits that are outside the silhouette. E.g. a tree leaf could be modeled with an alpha texture that decides whether hit points lie inside or outside the leaf. .PP Please see the description of the \f[CR]rtcSetGeometryIntersectFilterFunction\f[R] for a description of the filter callback function. .PP The \f[CR]rtcOccluded\f[R]\-type functions terminate traversal when a hit got committed. As filter functions can only set the \f[CR]tfar\f[R] distance of the ray for a committed hit, the occlusion filter cannot influence the \f[CR]tfar\f[R] value of subsequent traversal, as that directly ends. For that reason \f[CR]rtcOccluded\f[R] and occlusion filters cannot get used to gather the next n\-hits, and \f[CR]rtcIntersect\f[R] and intersection filters should get used instead. .SS EXIT STATUS On failure an error code is set that can be queried using \f[CR]rtcGetDeviceError\f[R]. .SS SEE ALSO [rtcSetGeometryIntersectFilterFunction]