Closed zixin96 closed 2 years ago
Actually, the second descriptor table should have 3 descriptors since the descriptor of the cube map is stored in the first descriptor table. So, the only remaining descriptors are the ones to the textures bricks2, tile and white1x1.
Thanks for the reply. I later found some more mismatches with regard to the number of descriptors, but it didn't affect the correctness of these demos. I guess we could just ignore them.
Yep! We are ok as long as the shader code doesn't access the array of textures out of bounds and get the proper texture by using the index in the MaterialData related to the object you are drawing.
https://github.com/d3dcoder/d3d12book/blob/4cfd00afa59210a272f62caf0660478d18b9ffed/Chapter%2018%20Cube%20Mapping/CubeMap/CubeMapApp.cpp#L495
Since we have 4 textures in this demo, shouldn't the second descriptor table have 4 descriptors instead of 5?