zig-gamedev dev repo
The original repo spawned in July 2021 by Michal Ziulek. This is the main development repo for the zig-gamedev libraries and sample applications.
- Download and install Git LFS
- Download and install anyzig (recommended) or get a compatible Zig compiler by some other means.
- Clone this repo
git clone [email protected]:zig-gamedev/zig-gamedev.git && cd zig-gamedev
Build and run a sample app:
zig build physically_based_rendering_wgpu-runGet a list of all available build steps for the native target:
zig build -lGet a list of all available build steps for web (using emscripten):
zig build -l -Dtarget=wasm32-emscriptenSome of the sample applications are listed below. More can be found in samples directory.
-
physically based rendering (wgpu): This sample implements physically-based rendering (PBR) and image-based lighting (IBL) to achive realistic looking rendering results.
zig build physically_based_rendering_wgpu-run -
audio experiments (wgpu): This sample lets the user experiment with audio and observe data that feeds the hardware.
zig build audio_experiments_wgpu-run -
bullet physics test (wgpu): This sample application demonstrates how to use full 3D physics engine in your Zig programs.
zig build bullet_physics_test_wgpu-run -
procedural mesh (wgpu): This sample shows how to efficiently draw several procedurally generated meshes.
zig build procedural_mesh_wgpu-run -
gui test (wgpu): This sample shows how to use our zgui library.
zig build gui_test_wgpu-run
Some of the sample applications are listed below. More can be found in samples directory. They can be built and run on Windows and Linux (Wine + VKD3D-Proton 2.8+):
-
bindless: This sample implements physically based shading and image based lighting to achieve realistic looking rendering results. It uses bindless textures and HLSL 6.6 dynamic resources.
zig build bindless-run -
rasterization: This sample application shows how GPU rasterizes triangles in slow motion.
zig build rasterization-run -
simple raytracer: This sample implements basic hybrid renderer. It uses rasterization to resolve primary rays and raytracing (DXR) for shadow rays.
zig build simple_raytracer-run -
mesh shader test: This sample shows how to use DirectX 12 Mesh Shader.
zig build mesh_shader_test-run








