Metallic is a rendering playground for modern GPU-driven rendering experiments.
- macOS uses the original Metal renderer with scene loading, mesh shaders, visibility-buffer rendering, ray-traced shadows, atmosphere, and an ImGui debug UI.
- Windows uses the newer backend-agnostic RHI path with a Vulkan 1.4 preview renderer and shared pipeline asset system.
- A standalone
PipelineEditorToollets you inspect and edit pipeline JSON graphs outside the renderer.
Most of the codebase is authored with heavy assistance from Claude Opus 4.6 and OpenAI GPT-5.3 Codex.
| Platform | Backend | Status |
|---|---|---|
| macOS (Apple Silicon) | Metal | Main renderer path |
| Windows | Vulkan 1.4 | Bootstrap / preview path |
Linux is not a supported target right now.
- Scene loading and rendering for Sponza
- Vertex forward, mesh shader forward, visibility buffer, and meshlet debug modes
- Meshlet frustum culling, backface cone culling, and GPU-driven culling
- Ray-traced shadows on the Metal path
- Atmospheric scattering sky rendering
- TAA, auto exposure, tonemapping, and per-pass debug UI
- FrameGraph execution with optional Graphviz DOT export
- Backend-agnostic RHI layer under
Source/RHI/ - Data-driven pipeline assets in
Pipelines/*.json - Slang shader compilation for Metal and Vulkan targets
- Runtime shader reload (
F5) and pipeline asset reload (F6) on the Metal renderer - Tracy profiling and spdlog logging
- GLFW + Vulkan bootstrap through the shared RHI
- Slang-to-SPIR-V compilation at startup
- Preview post stack driven by
Pipelines/vulkan_preview.json - Sky preview path when atmosphere textures and the sky shader are available
- Triangle fallback path when preview resources are unavailable
- Standalone ImGui + imnodes graph editor
- Loads and saves pipeline assets from
Pipelines/ - Visualizes pass/resource dependencies and validates the DAG
Source/
main.cpp Metal renderer entry point
main_vulkan.cpp Windows Vulkan preview entry point
Rendering/ Frame graph, passes, shader management, frame context
RHI/ Shared interfaces and backend implementations
PipelineEditor/ Shared pipeline asset, registry, and builder code
Platform/ Apple-specific runtime and bridge code
Scene/ Scene graph and inspector UI
Asset/ Mesh, meshlet, and material loading
Tools/
PipelineEditor/ Standalone pipeline editor executable
Shaders/ Slang and native MSL shader sources
Pipelines/ JSON pipeline assets
Asset/ Runtime textures, models, and atmosphere data
External/ Vendored third-party dependencies
cmake/ Build helpers, including Slang setup
Clone with submodules:
git clone --recursive <repo-url>
cd metallicIf you already cloned without submodules, sync the profiler dependency with:
git submodule update --init --recursive External/microprofileIf External/slang is missing, CMake will try to use:
-DSLANG_ROOT=<sdk-root>SLANG_ROOTSLANG_DIRExternal/slang
Requirements:
- Apple Silicon Mac
- Xcode command line tools
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target Metallic -j$(sysctl -n hw.ncpu)
./build/Source/MetallicNotes:
- The macOS build copies
Shaders/,Asset/, andPipelines/next to the executable. - The standalone pipeline editor is also available on macOS:
cmake --build build --target PipelineEditorTool -j$(sysctl -n hw.ncpu)
./build/Tools/PipelineEditor/PipelineEditorToolRequirements:
- Visual Studio 2022 or another CMake-capable MSVC toolchain
- Vulkan SDK
- A Slang SDK if
External/slangis not populated
cmake -S . -B build -DSLANG_ROOT=D:/path/to/slang
cmake --build build --config Debug --target Metallic
build/Source/Debug/Metallic.exeStandalone editor on Windows:
cmake --build build --config Debug --target PipelineEditorTool
build/Tools/PipelineEditor/Debug/PipelineEditorTool.exeNotes:
- The Windows renderer is currently a preview path, not feature parity with the Metal renderer.
- It exercises the shared RHI, shader compiler, frame graph, and pipeline asset system.
Metal renderer:
F5: rebuild shadersF6: reload pipeline JSON assetsG: exportframegraph.dot- ImGui renderer panel: switch render modes and toggle culling, TAA, RT shadows, and sky settings
Pipeline graphs live in Pipelines/ and are described as JSON:
resources: declared textures/bufferspasses: pass type, inputs, outputs, enabled state, side-effect flag, and pass config
Current in-tree examples include:
Pipelines/forward.jsonPipelines/meshlet_debug.jsonPipelines/visibility_buffer.jsonPipelines/vulkan_preview.json
The shared loader validates missing resources, duplicate producers, and graph cycles before execution.
| Library | Purpose |
|---|---|
metal-cpp |
Metal C++ wrapper on macOS |
| Vulkan SDK + VMA | Windows Vulkan backend |
| GLFW | Window creation and input |
| Dear ImGui | Debug UI |
| imnodes | Pipeline editor node graph UI |
| Slang | Shader authoring and code generation |
| microprofile | Lightweight frame scope profiling |
| Tracy | CPU/GPU profiling |
| spdlog | Logging |
| nlohmann/json | Pipeline asset serialization |
| meshoptimizer | Meshlet generation and culling support |
| cgltf / stb_image | Asset loading |
| MathLib | HLSL-style math helpers |