Z8 is a personal 3D rendering engine project built with Zig, Vulkan, and SDL3. It's a rewrite in Zig of my original R3DEngine, and serves as a playground for trying out new ideas, learning graphics programming, and exploring the Zig language.
This project is mostly for fun and personal growth. My goal is to have a flexible engine that I can use to experiment with rendering techniques, engine architecture, and new features as I learn. It's not intended to be a full-featured or production-ready engine, but rather a simple and approachable codebase for tinkering and prototyping.
The current implementation follows the first five chapters of the excellent vkguide tutorial, with some modifications and my own ideas mixed in.
The project is moving toward a voxel engine using GPU compute shaders, so expect most improvements to be made in that direction. If you don't understand something, feel free to ask me on GitHub or under one YouTube videos.
- Vulkan-based rendering loop
- SDL3 window and input handling
- Basic scene and material system (work in progress)
- ImGui integration for UI (work in progress)
- Basic camera and input handling
- Basic shader management
- GPU-based rendering pipeline
You'll need:
- Zig 0.14.0
- Vulkan SDK 1.3 or higher
- Clone this repository
- Make sure the Vulkan SDK is installed and available in your PATH
- Build the project:
zig build
- Run the engine:
zig-out/bin/z8.exe
If you run into issues, double-check your Vulkan SDK installation and Zig version.
src/
— Main engine source codeassets/
— Models, shaders, and other assetscommon/
— Third-party and utility librarieslibs/
— Zig build wrappers for dependencieslevels/
— Example scenes and levels
- vkguide — Main inspiration and reference
- Zig documentation
- Vulkan Tutorial
See the TODO list below for planned features and improvements. Completed items are checked off.
The following libraries are included in the project (no need to install separately):
- Add a configuration file to load and save settings
- Split ImGui into a separate module to build more complex UI
- Reorganize files and folders
- Destroy and create swapchain semaphores and fences when resizing the window
- Add a scene graph to manage objects in the scene
- Make a more generic scene graph
- Make a scene manager to load and unload scenes
- Make a better material system
- Create a material manager to load and unload materials
See LICENSE for details. Credits to all upstream libraries and inspirations.