Hi people. Happy new year to everyone!
I've recently started learning DirectX 12 and have a question about structured buffers. So, I've used structured buffers in compute shaders by creating a resource with the size of: "numElements * sizeof(elementStruct)". I now want to create a structured buffer that will have a bunch of material structures to use in pixel shader. All my materials are stored in one resource but I want to create an SRV(-s) to only a few of the materials that are located in the middle of the resource. Is there a way to do that?
I thought that I can do the same thing as I do with the textures: create an SRV to every material in the resource, create a descriptor table in root signature (with the desired number of descriptors) and then just pass a handle to the first material SRV to SetGraphicsRootDescriptorTable(), but with this only the first material is properly displayed. (Although RenderDoc shows that if I create a descriptor table with 2 descriptors both are added to the pixel shader)