Best way to turn entities ON/OFF during ray tracing in Optix

Thanks, the link was helpful. You mentioned there about:

a maximum of two acceleration structures (AS) from root node to leaf triangle geometry

So is sorting the geometries by material (where there are one (IAS -> GAS) per material group) as in my example runs partially on RT cores or fully?

it is using OptixBuildInputTriangleArray in OptiX 7. The code is based on intro_runtime project.

As said in the post I linked above, an IAS->GAS render graph hierarchy, which is what OPTIX_TRAVERSABLE_GRAPH_FLAG_ALLOW_SINGLE_LEVEL_INSTANCING means, where all GAS contain built-in triangle primitives, runs BVH traversal and ray-triangle intersection fully on the RT cores.
All your own device code is running on the Streaming Multiprocessors as before.