Advertisement

DX12 Occlusion Queries

Started by December 01, 2017 12:48 PM
11 comments, last by Infinisearch 7 years, 1 month ago
54 minutes ago, pcmaster said:

Thank you for the article. It's very interesting, however in the engine (and rather types of games) I'm implementing DX12 into, we don't happen to be instancing that very much and that approach doesn't lower the CPU cost - the higher level still has to prepare the data for each draw, which isn't negligible. But the approach sounds very good for many applications.

There is only one good way to cut on state and lower the cpu. Put all your textures in a huge table, put your materials in a huge structured buffer and let the shader fetch what it needs based on a material id ( important, it has to be uniform ). That way you can in theory draw your scene with as little as one multidraw per PSO ( put all your geometry in a single buffer too, or use ExecuteIndirect to swap VB but not on PS4... ).

4 hours ago, pcmaster said:

Thank you for the article. It's very interesting, however in the engine (and rather types of games) I'm implementing DX12 into, we don't happen to be instancing that very much and that approach doesn't lower the CPU cost - the higher level still has to prepare the data for each draw, which isn't negligible. But the approach sounds very good for many applications.

You can easily adapt the technique to use draw indirect.  Dynamic indexing is also an option if you're limiting yourself to binding tier 2.  And that approach does reduce the CPU cost since it does everything on the GPU... add in draw indirect and dynamic indexing and you'll mainly need to sort by shader and vertex type thats it.  Unless I linked the wrong article that is, but IIRC that article is a GPU based culling system using a compute shader.

-potential energy is easily made kinetic-

This topic is closed to new replies.

Advertisement