Our application has several different operating modes, each utilizing very similar Optix hierarchies and flow. When switching between the modes, I naturally try to trigger re-compilation as little as possible, and try to make any absolutely required changes affect only the lowest nodes.
I have now reached a situation where one operating mode had a Miss program, which simply does not apply to the new mode. Is there a way to unbind a Miss program from its Context?
Calling (through the C++ wrapper) context->setMissProgram( RAYTYPE, NULL) obviously fails.
Since programs are context (as opposed to material) bound, I would really hate to destroy my entire context and reload/recompile/refit all the data.
A possible workaround that I currently implemented was to replace the program with a dummy empty miss program. Does this incur a performance penalty ( ie- is there an overhead in the inner workings of Optix that makes it less efficient to run an empty Miss program as opposed to not setting one at all)?