-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Current situation
-
Full-scene 4× MSAA is enabled for all passes.
-
Frame-time at 1440 p 144 Hz on RX 5700 XT: 8.4 ms
-
VRAM consumed by MSAA buffers: 169 MB
-
Bandwidth is the limiting factor; dropping MSAA gains ~1.5 ms and ~100 MB VRAM.
Proposed change
-
Remove 4× MSAA from all main passes.
-
Implement TAA with 4-frame Halton 2,3 jitter:
-
History buffer: R11G11B10F (14 MB @ 1440 p)
-
Motion-vector pass must run before opaque (reprojection source).
-
-
Add 2× EQAA (AMD) only for the alpha-test pass (foliage, grass):
-
Extra 2× colour target, resolved with vkCmdResolveImage or ID3D12GraphicsCommandList::ResolveSubresource.
-
Estimated cost: +0.35 ms, +22 MB VRAM.
-
-
Optional: SMAA 1× ultra-light pass at 75 % resolution (can be toggled).
Benefits
-
Better sub-pixel stability at extreme draw distances (voxel wires).
-
Frees ~100 MB VRAM and ~1.5 ms GPU time → headroom for 144 fps lock.
-
Keeps foliage edges clean without full-scene MSAA bandwidth cost.
Implementation notes
-
Pipeline type: Forward (with Depth/Normal/Velocity Pre-pass)
-
Motion-vector pass exists: yes
-
Alpha-test pass uses separate RT: no
-
Vulkan sample flag found: VK_SAMPLE_COUNT_4_BIT
-
D3D12 sample desc found: n/a
Acceptance criteria
-
4× MSAA removed from main passes.
-
TAA 4-frame jitter implemented and stable (no ghosting on chunk edits).
-
2× EQAA enabled only for alpha-test pass.
-
Frame-time ≤ 6.5 ms and VRAM ≤ 48 MB for AA buffers at 1440 p 144 Hz.
-
No visual regressions (screenshots attached in PR).
Files to touch (auto-detected by agent)
- src/engine/graphics/rhi_vulkan.zig
- src/engine/graphics/vulkan_swapchain.zig
- src/engine/graphics/rhi_types.zig
- src/engine/graphics/camera.zig
- src/game/settings.zig
- src/game/settings/data.zig
- src/world/chunk_mesh.zig
- src/world/world_renderer.zig
- assets/shaders/vulkan/terrain.vert