Intel® Embree Ray Tracing Kernels
Discussion forum on the open source ray tracing kernels for fast photo-realistic rendering on Intel® CPU(s)
281 Discussions

rtcIntersect1M vs rtcIntersectNM for coherent rays

Burr__Adam
Beginner
1,169 Views

In my application I'm firing a small number (likely less than ~10k) of coherent rays and no secondary or incoherent rays. Also I need to minimize compute time. I see in the docs you recommend using ray streaming:

Best primary ray performance can be obtained by using the ray stream API and setting the intersect context flag to RTC_INTERSECT_CONTEXT_FLAG_COHERENT. 

I see the viewer_stream tutorial that uses rtcIntersect1M but is there any reason not to use rtcIntersectNM to fire streams of ray packets? Also, is there any overhead using rtcIntersectNM with N==1 vs rtcIntersect1M? If not I can profile the difference with less code. 

0 Kudos
1 Solution
SvenW_Intel
Moderator
1,169 Views

We switch to the same ray stream kernel for the special case wher N==1, thus there will be no performance difference. We use some packet tracing approach if you pass a stream of packets, thus you will see higher performance for coherent rays.

View solution in original post

0 Kudos
1 Reply
SvenW_Intel
Moderator
1,170 Views

We switch to the same ray stream kernel for the special case wher N==1, thus there will be no performance difference. We use some packet tracing approach if you pass a stream of packets, thus you will see higher performance for coherent rays.

0 Kudos
Reply