Tutorials
The Zenith.NET tutorials examine complete rendering workloads built with C# and the Slang shader language. Each guide focuses on the resources, pipelines, commands, data contracts, and lifetime rules that connect a workload to Zenith.NET.
Begin with Project Setup and Application Host. The six guides then move from a first graphics pipeline to compute, indirect drawing, inline ray queries, and programmable geometry.
Note
The guides explain the Zenith.NET integration points in detail. Supporting graphics techniques such as sampling patterns, tone mapping, and procedural mesh generation are summarized when they are not essential to the API workflow. Their complete implementations remain available in the tutorial source.
Getting started
- Project Setup creates the .NET 10 project and configures runtime assets.
- Application Host follows the cross-platform window, swap chain, frame loop, and offscreen texture presenter.
Guides
| Guide | Result | Focus |
|---|---|---|
| Hello Triangle | A vertex-colored triangle | Vertex input, graphics pipeline, render pass, and draw command |
| Spinning Cube | A rotating depth-tested cube | Indexed geometry, constant buffers, transforms, depth, and resize |
| Compute Shader | A grayscale image | Storage textures, descriptor handles, dispatch, and layout transitions |
| Indirect Drawing | A grid of animated cubes | Structured instance data and indirect draw arguments |
| Ray Tracing | Procedural spheres above a floor | Acceleration structures, inline ray queries, and compute output |
| Mesh Shading | A culled sphere grid | Task and mesh shaders, payload compaction, and mesh dispatch |
The complete, runnable implementations are maintained in the ZenithTutorials repository. Code shown in these pages is static so it remains readable and searchable with the rest of the documentation; each guide links its complete renderer and shader at the end.
Suggested paths
Complete Hello Triangle first. From there:
- continue with Spinning Cube and Indirect Drawing for the graphics path;
- continue with Compute Shader and Ray Tracing for compute-produced images;
- read Mesh Shading after Spinning Cube when you are comfortable with graphics pipelines, depth attachments, and GPU thread groups.
Ray tracing and mesh shading are optional device capabilities. Their guides show how to test support before creating workload-specific resources.