Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
111 Views

rtcIntersect1M vs rtcIntersectNM for coherent rays

Jump to solution

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

Accepted Solutions
Highlighted
Moderator
111 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
Highlighted
Moderator
112 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