Hi,
I’ve started exploring Optix , using Optix 3.8. I’ve browsed the samples (#1-8)/tutorials and am going through the documentation; and focusing on the examples Whitted and Cook for reference on full fledged implementation. However, I believe I am missing few basic things - so it maybe a beginner question, however did not find clear description in the programming guide or an answer in this forum:
-
Relationship between rays,pixels and launch index: As I understand, the basic approach is to launch one (backward) ray per pixel, and on intersection recurse for shadows/reflections etc. This is achieved by launching contexts with a 2d grid (i.e. considering the pixels form a 2d grid) with m_context->launch(entry_point,width,height). This invokes my ray generation program width*height times, and since my Context Launch is 2d the launch index is also going to be 2d with [launch_index.x=0 to width-1 ; launch_index.y=0-height-1] - thus mapping launch_index to the pixel identifier. Is this understanding correct?
-
If yes, how do I launch multiple rays per pixel (e.g. for sampling)? Should I trace multiple rays within my camera/raygen program, or launch the raygen program multiple times/pixel? Or should this be done in the closest hit/shading program?I assume the Cook sample program does multiple rays/pixel - but am not able to spot exactly how.
I understand the path_tracer and mis_sample programs do this for path tracing - but I’m just trying to extend the ray tracer with multiple rays/pixel (and not writing a path tracer). What’s a good Optix sample/example for this? -
What’s the exact difference between GLUTDisplay::CDProgressive and GLUTDisplay::CDNone? Could not find any documentation on this.
Thanks a lot for your help. Again, if I’m missing something obvious thanks for your patience in explaining.
Cheers,Wiz