Is there an easy way to know withing the closest hit or any hit program which object was hit? I’d prefer to use a single material for all but can encode the information into the material. I do however wish to use the same hit program to be flexible with the number of objects.
Is there an easy way to do this?
The idea is to do batch processing where I keep track of which object was hit and send the data to the appropriate buffer.