DXR and multiple meshes

Hi everyone!

I’m having a hard time understanding how to manage multiple meshes using DXR. I’ll explain better.
I have my test where I have some BLAS and one TLAS that reference them.
When firing rays, I see that I can get an InstanceID, which tells me what instance of the of a BLAS has been touched, but I cannot know what BLAS has been touched, so I cannot know what material I should use for it.
I’m also at a loss on how I should manage this: should I load all my meshes, textures and material data inside some structured buffer and access them according to the mesh that has been hit? (If I can find a way to know that, of course :D)

Let me know if you can help :D