codeonwort / Cyseal

Cross-API engine which will support DX12 and Vulkan renderer
1 stars 0 forks source link

GPU frustum culling #10

Closed codeonwort closed 1 year ago

codeonwort commented 1 year ago

Argument buffer layout is hard-coded for base pass.

  1. Fill indirect draw buffer (currently from CPU).
  2. Cull the buffer from GPU.
  3. Execute indirect draw with the culled buffer.

GPU culling can be toggled at runtime via imgui.

gpu_cull

If enabled, GPUCulling pass is executed during BasePass.

gpu_cull_2

Result of GPUCulling pass. If GPU culling is disabled, this pass is skipped and indirect draw will just use IndirectDrawBuffer. If enabled, indirect draw uses CulledIndirectDrawBuffer and IndirectDrawCounterBuffer.