Creating multiple pipelines with different __raygen__

The pipeline is coupled with the Shader Binding Table (SBT).
Each pipeline needs its own SBT which contains the matching SBT record headers (32 bytes of information about your pipeline’s entry point functions).

Check your calls to optixSbtRecordPackHeader() for the ray generation program groups and the raygenRecord field in your shader binding tables (plural!).

You can not switch only the pipeline inside the optixLaunch().
Means your &sbt argument should be &sbt[i] instead.

Related thread:

Related search for “SBT” in this OptiX forum for more information:

Related chapters inside the OptiX Programming Guide: