gfx-playground
cross platform rendering playgroundClone
Loading...Screenshots

Overview
GPU driven Vulkan/Metal playground renderer (main renderer is Vulkan on Windows/Linux for now), contains a rendering interface, a precompiled frame-graph, DescriptorHandle<T> based bindless resource fetching, and a basic ImGui editor. Generally intended to be a gfx lab bench for myself.
- Explicit frame-graph (
src/passes/fg.*), passes declare read/write states and barriers get baked outside the hot path. - GPU-driven MDI forward path: compute shader, build-indirect, HiZ and frustum culling -> depth-pre -> forward.
- Cascaded shadow maps, clustered point lights, DDGI or infinite IBL for indirect.
- IBL skybox from HDR, gltf load (cgltf + KTX + mikktspace), ImGui editor with shader reload.
- Render backend abstraction in
src/backend/rhi.h. Metal coverage runssrc/backend/conformance/*for now as I work on expanding the coverage.
Local setup
- Vulkan SDK 1.4+
- C++20, CMake 3.31+ (CMake path only), Ninja recommended
- Windows: VS2022 +
vswhereon PATH (bat should find it for you). Linux: gcc/clang + dev Vulkan headers. macOS: conformance-only (main renderer unsupported, Metal WIP).
git submodule update --init --recursiveSubmodules: glfw, VMA, rtm, imgui, KTX-Software, plog. Slang 2026.17.1 is fetched as a binary (CMake FetchContent, or auto-downloaded by the bat/sh scripts)
Scripts
build_win.bat # Windows debug
build_win.bat -r # Windows release
build_win.bat -c # clean rebuild
build_win.bat triangle # conformance probe (no renderer)
./build_linux.sh # Linux debug (add triangle for probe)
./build_linux.sh -r # Linux release
./build_mac.sh triangle # macOS probe onlyCMake
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build buildTo-do
There's generally just a lot to do all over the place in this, but currently I'm just slowly chipping away at the editor and Metal coverage, toward renderer.cpp.