You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Libraries now live in their own repositories and are consumed using Zig's package manager. Git submodules are also included in this repo for developer convenience but are not required to build. Users that wish to use the submodules instead of remote packages can replace build.zig.zon with dev.build.zig.zon.
Download and install anyzig (recommended) or get a Zig compiler by some other means.
Clone this repo git clone git@github.com:zig-gamedev/zig-gamedev.git && cd zig-gamedev
(Optional) Get the submodules and use them instead of the package manager git submodule update --init && mv build.zig.zon backup.build.zig.zon && mv dev.build.zig.zon build.zig.zon
Build and run a sample app:
zig build physically_based_rendering_wgpu-run
Get a list of all available build steps for the native target:
zig build -l
Get a list of all available build steps for web (using emscripten):
zig build -l -Dtarget=wasm32-emscripten
Sample applications (native wgpu)
Some 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
Sample applications (DirectX 12)
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
About
Dev repo for @zig-gamedev libs and sample applications