I’m working on an application with that uses two ray generation programs. I want to launch one, then use the output from it as input to the second one. However, since there are some inputs to the second ray generation program that I don’t know to begin with, I’d like to leave some of the objects used only by the second program uninitialized to begin with (such as output buffers and acceleration structures), since I don’t know their sizes yet.
However, when I run the first ray generation program, I get this error:
OptiX Error: Invalid value (Details: Function "_rtContextLaunch2D" caught exception: Initalization of non-primitive type output_buffer: Buffer object, )
This is referring to the RTbuffer used only by the second ray generation program.
I can assign junk data to the buffers and acceleration structures to make the program run, but is there a better way? Is there an equivalent of NULL for an RTobject that I could assign temporarily while the first ray generation program runs?