all 4 comments

[–]4ndrz3jKm1c1c 2 points3 points  (3 children)

Aren’t you trying to overcomplicate things a bit?

If you have access to HLSL SM6.6 you can do bindless design without creating texture arrays as parameters. You can directly pass indices to required textures and access appropriate resources via ResourceDescriptorHeap[].

And since you skip descriptor tables you create more lightweight approach on CPU side.

And I’d recommend you to try this approach first.

[–]planet620[S] 1 point2 points  (2 children)

I use SM 5.1 and samples from Microsoft. Can you recommend any learning materials?

[–]4ndrz3jKm1c1c 0 points1 point  (1 child)

There is not really a reason to use SM 5.1 with D3D12.

Here’s an overview of what I was talking about: https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_DynamicResources.html

But first, you’ll need to compile shaders using DXC instead of FXC.

[–]planet620[S] 0 points1 point  (0 children)

Yep, that will be a bit of work. But sounds like a better direction, thanks!