Quantcast
Channel: Embree: Photo-Realistic Ray Tracing Kernels
Viewing all articles
Browse latest Browse all 21

How is RTCRay::id set and what values to expect?

$
0
0

I am trying to use RTCIntersectContext::RTCFilterFunctionN with rtcIntersect1M with per-ray data. I see this in the docs:

callback functions may be invoked with an arbitrary packet size (of size 1, 4, 8, or 16) and different ordering as specified initially. For this reason, one may have to use the rayID component of the ray to identify the original ray, e.g. to access a per-ray payload.

But it isn't clear to me how RTCRay::id is supposed to be set. I tried initializing the ray stream with consecutive ids (0 to stream size) but the ids returned by RTCRayN_id contain many zeros, large out of range values. I'm probably missing something in the docs or tutorials but I can't figure out how it should work.

Let me know if you want to see any code.


Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>