optixGetPrimitiveIndex() return 0 when using mutiple OptixBuildInput

That is a little sparse on the information required to say what is going on.
That would require the exact code of the build input parameters and the shader binding table setup to see if there is something is missing.
E.g. OptixBuildInput structure initialization, flags is an array, how many SBT records per build input, matching SBT setup?

https://raytracing-docs.nvidia.com/optix7/guide/index.html#acceleration_structures#primitive-build-inputs

1 Like