directx-12

DirectX 12 - Descriptor heaps

孤街浪徒 提交于 2019-12-06 05:36:19
I've just been starting to learn the new DirectX 12 API. I want to write sone kind of rendering engine on top of dx12 and during initialization I'm supposed to create descriptor heaps. The problem with that is that at this point in time I don't know how many resource views I will create in the future. e.g. if I want to include some kinds of post processing effects which require render to texture approaches I have to create render target views for the textures I'm rendering to. The amount of those RTVs can vary though. So how do you create descriptor heaps being big enough to cope with every

D3D12 Use backbuffer surface as unordered access view (UAV)

雨燕双飞 提交于 2019-12-02 05:41:20
Im making a simple raytracer for a schoolproject were a compute shader is supposed to be used to shade a triangle or some other primitive. For this I'd like to write to a backbuffer-surface directly in the compute shader, to then present the results imideatly. I know for certain that this is possible in DX11 though i can't seem to get it to work in DX12. I couldn't gather that much information about this, but i found this gamedev thread discussing the exact same problem I try to figure out and they seem to come to the conclusion which was my go to workaround: writing to an intermediate texture