@@ -43,7 +43,7 @@ _layout: landing
π―
- Unified API β Write once, run everywhere. A single API abstracts DirectX 12, Metal, and Vulkan.
+ Unified API β Write once, run everywhere. A single API abstracts DirectX 12, Metal 4, and Vulkan 1.4.
@@ -98,7 +98,7 @@ _layout: landing
1
Initialize
-
Create a graphics context with your preferred backend (DirectX 12, Metal, or Vulkan).
+
Create a graphics context with your preferred backend (DirectX 12, Metal 4, or Vulkan 1.4).
diff --git a/documents/templates/public/main.css b/documents/templates/public/main.css
index ba7edc8e..7fdbe873 100644
--- a/documents/templates/public/main.css
+++ b/documents/templates/public/main.css
@@ -106,6 +106,14 @@ body {
color: var(--text-primary);
}
+/* Full-width layout */
+main.container-xxl,
+header .container-xxl {
+ max-width: 100% !important;
+ padding-left: 2rem !important;
+ padding-right: 2rem !important;
+}
+
/* ==========================================================================
3. Navbar
========================================================================== */
@@ -1127,6 +1135,8 @@ article th {
color: var(--text-tertiary) !important;
background: transparent !important;
border: none !important;
+ white-space: nowrap !important;
+ vertical-align: middle !important;
}
article thead tr th:first-child {
@@ -1152,6 +1162,7 @@ article td {
background: transparent !important;
border: none !important;
border-top: 1px solid var(--border) !important;
+ vertical-align: middle !important;
}
article tbody tr:first-child td {
@@ -1801,12 +1812,12 @@ article td a {
20. Hide UI Elements
========================================================================== */
-article h1 > a,
-article h2 > a,
-article h3 > a,
-article h4 > a,
-article h5 > a,
-article h6 > a,
+article h1 > a:not(.header-action),
+article h2 > a:not(.header-action),
+article h3 > a:not(.header-action),
+article h4 > a:not(.header-action),
+article h5 > a:not(.header-action),
+article h6 > a:not(.header-action),
a[href^="http"]::after,
a[href^="https"]::after {
display: none !important;
diff --git a/documents/templates/public/main.js b/documents/templates/public/main.js
index 52af81b7..f61c827e 100644
--- a/documents/templates/public/main.js
+++ b/documents/templates/public/main.js
@@ -7,6 +7,13 @@
}
],
start: () => {
+ // Prevent short table cells from wrapping (e.g. "DirectX 12", "Vulkan 1.4")
+ for (const td of document.querySelectorAll('article td')) {
+ if (td.textContent.trim().length <= 20) {
+ td.style.whiteSpace = 'nowrap';
+ }
+ }
+
// Hide inherited type info sections (inheritance, implements, inheritedMembers, derivedClasses)
for (const dl of document.querySelectorAll('dl.typelist.inheritance, dl.typelist.implements, dl.typelist.inheritedMembers, dl.typelist.derivedClasses')) {
dl.style.display = 'none';
diff --git a/documents/tutorials/advanced/ray-tracing.md b/documents/tutorials/advanced/ray-tracing.md
index cb0ca2f8..3095dcb6 100644
--- a/documents/tutorials/advanced/ray-tracing.md
+++ b/documents/tutorials/advanced/ray-tracing.md
@@ -684,10 +684,15 @@ while (query.Proceed())
uint sphereIndex = query.CandidatePrimitiveIndex();
Sphere sphere = spheres[sphereIndex];
+ float3 ro = query.CandidateObjectRayOrigin();
+ float3 rd = query.CandidateObjectRayDirection();
+
float t = IntersectSphere(ro, rd, sphere);
if (t >= query.RayTMin() && t <= query.CommittedRayT())
{
+ float3 hitPoint = ro + rd * t;
+
sphereHitNormal = normalize(hitPoint - sphere.Center);
sphereHitColor = sphere.Color;
@@ -742,6 +747,9 @@ bool TraceShadowRay(float3 origin, float3 direction)
uint sphereIndex = shadowQuery.CandidatePrimitiveIndex();
Sphere sphere = spheres[sphereIndex];
+ float3 ro = shadowQuery.CandidateObjectRayOrigin();
+ float3 rd = shadowQuery.CandidateObjectRayDirection();
+
float t = IntersectSphere(ro, rd, sphere);
if (t >= shadowQuery.RayTMin() && t <= shadowQuery.CommittedRayT())
diff --git a/documents/tutorials/getting-started/prerequisites.md b/documents/tutorials/getting-started/prerequisites.md
index de49e106..b042b190 100644
--- a/documents/tutorials/getting-started/prerequisites.md
+++ b/documents/tutorials/getting-started/prerequisites.md
@@ -137,11 +137,8 @@ Different graphics backends use different indexing schemes for resource bindings
| Backend | Index Scheme |
|---------|--------------|
| DirectX 12 | Per-type: CBV, SRV, UAV, Sampler each start at 0 |
-| Vulkan | Global: All resources share index space (0, 1, 2, ...) |
-| Metal | Per-category: Buffer, Texture, Sampler each start at 0 |
-
-Create `BindingHelper.cs` to handle these differences automatically:
-
+| Metal 4 | Per-category: Buffer, Texture, Sampler each start at 0 |
+| Vulkan 1.4 | Global: All resources share index space (0, 1, 2, ...) |
```csharp
namespace ZenithTutorials;
@@ -184,17 +181,6 @@ internal static class BindingHelper
}
break;
- case Backend.Vulkan:
- {
- for (int i = 0; i < bindings.Length; i++)
- {
- ref ResourceBinding binding = ref bindings[i];
-
- binding = binding with { Index = (uint)i };
- }
- }
- break;
-
case Backend.Metal:
{
uint bufferIndex = 0;
@@ -224,6 +210,17 @@ internal static class BindingHelper
}
}
break;
+
+ case Backend.Vulkan:
+ {
+ for (int i = 0; i < bindings.Length; i++)
+ {
+ ref ResourceBinding binding = ref bindings[i];
+
+ binding = binding with { Index = (uint)i };
+ }
+ }
+ break;
}
return bindings;
@@ -294,7 +291,7 @@ internal static partial class CocoaHelper
}
```
-The `CAMetalLayer` can be used with both Metal and Vulkan backends on macOS.
+The `CAMetalLayer` can be used with both Metal 4 and Vulkan 1.4 backends on macOS.
## Application Framework
@@ -319,9 +316,9 @@ internal static class App
static App()
{
// Ensure platform is supported
- if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux() && !OperatingSystem.IsMacOS())
+ if (!OperatingSystem.IsWindows() && !OperatingSystem.IsMacOS() && !OperatingSystem.IsLinux())
{
- throw new PlatformNotSupportedException("This tutorial only supports Windows, Linux, and macOS.");
+ throw new PlatformNotSupportedException("This tutorial only supports Windows, macOS, and Linux.");
}
// Create window with no graphics API (we manage rendering ourselves)
@@ -342,17 +339,17 @@ internal static class App
surface = Surface.Win32(window.Native!.Win32!.Value.Hwnd, Width, Height);
}
- else if (OperatingSystem.IsLinux())
+ else if (OperatingSystem.IsMacOS())
{
- Context = GraphicsContext.CreateVulkan(useValidationLayer: true);
+ Context = GraphicsContext.CreateMetal(useValidationLayer: true);
- surface = Surface.Xlib(window.Native!.X11!.Value.Display, (nint)window.Native.X11.Value.Window, Width, Height);
+ surface = Surface.Apple(CocoaHelper.CreateLayer(window.Native!.Cocoa!.Value), Width, Height);
}
else
{
- Context = GraphicsContext.CreateMetal(useValidationLayer: true);
+ Context = GraphicsContext.CreateVulkan(useValidationLayer: true);
- surface = Surface.Apple(CocoaHelper.CreateLayer(window.Native!.Cocoa!.Value), Width, Height);
+ surface = Surface.Xlib(window.Native!.X11!.Value.Display, (nint)window.Native.X11.Value.Window, Width, Height);
}
// Log validation messages for debugging
@@ -440,7 +437,7 @@ This framework provides:
- **Platform validation** - Ensures only supported platforms (Windows, Linux, macOS) are used
- **Window creation** with Silk.NET (1280Γ720 default size)
-- **Cross-platform backend selection** (DirectX 12 on Windows, Vulkan on Linux, Metal on macOS)
+- **Cross-platform backend selection** (DirectX 12 on Windows, Metal 4 on macOS, Vulkan 1.4 on Linux)
- **SwapChain management** for presenting frames
- **Resize handling** for responsive rendering
- **Generic renderer pattern** using `App.Run
()` for easy tutorial switching
From 4e983ee33dd594329c328c884f5a6864f30d40f4 Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Tue, 31 Mar 2026 20:34:15 +0800
Subject: [PATCH 08/14] fix(docs): update CornellBox conventions for accuracy
in DirectX and Vulkan versions
---
sources/Experiments/CornellBox/CONVENTIONS.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sources/Experiments/CornellBox/CONVENTIONS.md b/sources/Experiments/CornellBox/CONVENTIONS.md
index 455deeea..6b57de1c 100644
--- a/sources/Experiments/CornellBox/CONVENTIONS.md
+++ b/sources/Experiments/CornellBox/CONVENTIONS.md
@@ -2,7 +2,7 @@
## Overview
-A dual-mode Cornell Box renderer built on the Zenith.NET multi-backend GPU framework (DirectX12 / Vulkan / Metal).
+A dual-mode Cornell Box renderer built on the Zenith.NET multi-backend GPU framework (DirectX 12 / Metal 4 / Vulkan 1.4).
Two rendering modes switchable via ImGui radio buttons at runtime:
- **Path Tracing** (mode 0): `ComputePipeline` + inline `RayQuery<>`, progressive accumulation with NEE (Next Event Estimation), Cook-Torrance PBR BRDF (GGX + Schlick Fresnel + Smith G), GGX importance sampling for specular, cosine-weighted hemisphere for diffuse, Russian roulette, environment sky light on ray miss. Only available when `Context.Capabilities.RayTracingSupported` is true.
@@ -11,7 +11,7 @@ Two rendering modes switchable via ImGui radio buttons at runtime:
## Current State (2026-03-30)
- All files implemented and compiling successfully
-- DX12 validation layer clean
+- DirectX 12 validation layer clean
- Camera initial position: (278, 273, -800), Speed=240, FarPlane=2000, looks into the box
- Swap chain format: B8G8R8A8UNorm color + D32FloatS8UInt depth/stencil
- `Renderer` abstract base class unifies both renderers (`Update` / `Render` / `Resize` + `IDisposable`)
@@ -775,10 +775,10 @@ base (FrameBuffer + DepthStencil + Color)
β constantBuffer β materialBuffer β indexBuffer β vertexBuffer
```
-## DX12 Specific Notes
+## DirectX 12 Specific Notes
-- `BindingHelper` assigns DX12 register indices by type: CBV(b), SRV(t), UAV(u), Sampler(s) independently numbered
-- Vulkan numbers all bindings sequentially; Metal uses argument buffer index
+- `BindingHelper` assigns DirectX 12 register indices by type: CBV(b), SRV(t), UAV(u), Sampler(s) independently numbered
+- Vulkan 1.4 numbers all bindings sequentially; Metal 4 uses argument buffer index
## C# Code Style
From f2f6c69e3cd7b4b6aaf4f3f119c2c8f9ea535e8d Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Tue, 31 Mar 2026 20:44:49 +0800
Subject: [PATCH 09/14] Update templates and metadata for API version clarity
- Streamlined bug report template by merging sections and clarifying environment details; updated placeholders to specify API versions (DirectX 12, Metal 4, Vulkan 1.4).
- Removed general issue template (custom.yaml) and "Feature Discussions" contact link, directing general queries to Discussions.
- Updated NuGet package description and tags to reflect precise supported API versions.
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 31 +++++++++-----------------
.github/ISSUE_TEMPLATE/config.yml | 5 +----
.github/ISSUE_TEMPLATE/custom.yaml | 24 --------------------
sources/NuGet.Packaging.props | 4 ++--
4 files changed, 13 insertions(+), 51 deletions(-)
delete mode 100644 .github/ISSUE_TEMPLATE/custom.yaml
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 1ac4d77c..e0dc220f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -13,37 +13,26 @@ body:
required: true
attributes:
label: Describe the bug
- description: A clear and concise description of what the bug is.
- placeholder: E.g. When initializing a DirectX12 context, an exception is thrown on integrated graphics.
-
- - type: textarea
- validations:
- required: true
- attributes:
- label: Steps to reproduce
- description: Steps to reproduce the behavior. Include a minimal code example if possible.
+ description: A clear and concise description of what the bug is, including steps to reproduce and expected behavior.
placeholder: |
- 1. Create a GraphicsContext with DirectX12
+ What happened:
+ E.g. When initializing a DirectX 12 context, an exception is thrown on integrated graphics.
+
+ Steps to reproduce:
+ 1. Create a GraphicsContext with DirectX 12
2. Call CreateSwapChain()
3. See exception
- - type: textarea
- validations:
- required: true
- attributes:
- label: Expected behavior
- description: What you expected to happen.
- placeholder: DirectX12 context should initialize successfully.
+ Expected behavior:
+ DirectX 12 context should initialize successfully.
- type: textarea
- validations:
- required: true
attributes:
label: Environment
- description: Please provide your environment details.
+ description: Please provide your environment details (if applicable).
placeholder: |
- OS: Windows 11 / macOS 15 / Ubuntu 24.04 / etc.
- - Graphics API: DirectX12 / Metal / Vulkan
+ - Graphics API: DirectX 12 / Metal 4 / Vulkan 1.4
- Zenith.NET Version: 1.0.0
- GPU: NVIDIA RTX 4090 / Apple M3 / etc.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index e44e9ffc..8f99e94d 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -5,7 +5,4 @@ contact_links:
about: I have a question about how to use Zenith.NET or need help with graphics programming.
- name: Documentation
url: https://qian-o.github.io/Zenith.NET/
- about: Check out the documentation and tutorials for Zenith.NET.
- - name: Feature Discussions
- url: https://github.com/qian-o/Zenith.NET/discussions/categories/ideas
- about: Discuss new ideas and features for Zenith.NET with the community.
\ No newline at end of file
+ about: Check out the documentation and tutorials for Zenith.NET.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/custom.yaml b/.github/ISSUE_TEMPLATE/custom.yaml
deleted file mode 100644
index 40d48e05..00000000
--- a/.github/ISSUE_TEMPLATE/custom.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-ο»Ώname: General Issue
-description: For issues that do not fit other templates
-title: "Issue: "
-labels: ["needs-triage"]
-body:
- - type: markdown
- attributes:
- value: |
- This template is for issues that don't fit into Bug Report or Feature Request.
- For questions or discussions, please use the [Discussions](https://github.com/qian-o/Zenith.NET/discussions) section.
-
- - type: textarea
- validations:
- required: true
- attributes:
- label: Description
- description: Describe your issue or question in detail.
- placeholder: Please provide a clear description...
-
- - type: textarea
- attributes:
- label: Additional context
- description: Add any relevant information, environment details, code snippets, or screenshots.
- placeholder: Any additional information that might help.
\ No newline at end of file
diff --git a/sources/NuGet.Packaging.props b/sources/NuGet.Packaging.props
index cf795345..6325bbfe 100644
--- a/sources/NuGet.Packaging.props
+++ b/sources/NuGet.Packaging.props
@@ -10,7 +10,7 @@
0.0.7
qian-o
Copyright (c) 2026 qian-o
- Zenith.NET is a modern, cross-platform graphics and compute library for .NET. It provides a unified GPU programming interface supporting DirectX12, Metal, and Vulkan backends.
+ Zenith.NET is a modern, cross-platform graphics and compute library for .NET. It provides a unified GPU programming interface supporting DirectX 12, Metal 4, and Vulkan 1.4 backends.
Git
@@ -20,7 +20,7 @@
Zenith.NET.png
LICENSE
README.md
- DirectX12;Metal;Vulkan;ImageSharp;ImGui;Skia;Slang;Avalonia;Maui;Uno;WinForms;WinUI;WPF;GPU;Native
+ DirectX12;Metal4;Vulkan1.4;ImageSharp;ImGui;Skia;Slang;Avalonia;Maui;Uno;WinForms;WinUI;WPF;GPU;Native
https://qian-o.github.io/Zenith.NET
From 481f5c6f2faf3cb158e68a56e91c408f67354430 Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Tue, 31 Mar 2026 21:15:30 +0800
Subject: [PATCH 10/14] Update platform order to Windows, macOS, Linux
throughout
Reorder platform checks in App.cs for backend/surface selection.
Standardize documentation and UI to use "Windows, macOS, Linux".
Fix minor typos and clarify backend binding notes in docs.
No functional changes; improves clarity and consistency.
---
README.md | 2 +-
documents/docs/index.md | 2 +-
documents/index.md | 2 +-
documents/tutorials/getting-started/prerequisites.md | 6 +++---
documents/tutorials/index.md | 2 +-
sources/Experiments/CornellBox/App.cs | 12 ++++++------
sources/Experiments/CornellBox/CONVENTIONS.md | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 9fdcd852..bd640b50 100644
--- a/README.md
+++ b/README.md
@@ -38,9 +38,9 @@ Visit the [documentation site](https://qian-o.github.io/Zenith.NET/) for tutoria
| | DirectX 12 | Metal 4 | Vulkan 1.4 |
| :-------: | :--------: | :-----: | :--------: |
| Windows | β
| | β
|
-| Linux | | | β
|
| Apple | | β
| β
|
| Android | | | β
|
+| Linux | | | β
|
---
diff --git a/documents/docs/index.md b/documents/docs/index.md
index dea9a6d6..bb3c67bc 100644
--- a/documents/docs/index.md
+++ b/documents/docs/index.md
@@ -68,9 +68,9 @@ Pipelines reference a single `ResourceLayout`, and you bind a corresponding `Res
| Platform | DirectX 12 | Metal 4 | Vulkan 1.4 |
|----------|:----------:|:-----:|:------:|
| Windows | Yes | No | Yes |
-| Linux | No | No | Yes |
| Apple | No | Yes | Yes |
| Android | No | No | Yes |
+| Linux | No | No | Yes |
## Best Practices
diff --git a/documents/index.md b/documents/index.md
index e8af7a14..1ee6696f 100644
--- a/documents/index.md
+++ b/documents/index.md
@@ -31,7 +31,7 @@ _layout: landing
Platforms
- Windows Β· Linux Β· Apple Β· Android
+ Windows Β· Apple Β· Android Β· Linux
diff --git a/documents/tutorials/getting-started/prerequisites.md b/documents/tutorials/getting-started/prerequisites.md
index b042b190..6bf89a7e 100644
--- a/documents/tutorials/getting-started/prerequisites.md
+++ b/documents/tutorials/getting-started/prerequisites.md
@@ -11,12 +11,12 @@ Zenith.NET supports multiple graphics backends across platforms:
| Platform | DirectX 12 | Metal 4 | Vulkan 1.4 |
|----------|:----------:|:-------:|:----------:|
| Windows |
Yes |
No |
Yes |
-| Linux |
No |
No |
Yes |
| Apple |
No |
Yes |
Yes |
| Android |
No |
No |
Yes |
+| Linux |
No |
No |
Yes |
> [!NOTE]
-> These tutorials are designed for desktop platforms (Windows, Linux, and macOS).
+> These tutorials are designed for desktop platforms (Windows, macOS, and Linux).
### Software
@@ -435,7 +435,7 @@ App.Cleanup();
This framework provides:
-- **Platform validation** - Ensures only supported platforms (Windows, Linux, macOS) are used
+- **Platform validation** - Ensures only supported platforms (Windows, macOS, Linux) are used
- **Window creation** with Silk.NET (1280Γ720 default size)
- **Cross-platform backend selection** (DirectX 12 on Windows, Metal 4 on macOS, Vulkan 1.4 on Linux)
- **SwapChain management** for presenting frames
diff --git a/documents/tutorials/index.md b/documents/tutorials/index.md
index f8d26ee2..74d10369 100644
--- a/documents/tutorials/index.md
+++ b/documents/tutorials/index.md
@@ -66,7 +66,7 @@ Before starting, ensure you have:
- Visual Studio 2026, VS Code, or JetBrains Rider
> [!NOTE]
-> These tutorials are designed for desktop platforms (Windows, Linux, and macOS).
+> These tutorials are designed for desktop platforms (Windows, macOS, and Linux).
> See [Prerequisites](getting-started/prerequisites.md) for detailed platform support and setup instructions.
## Source Code
diff --git a/sources/Experiments/CornellBox/App.cs b/sources/Experiments/CornellBox/App.cs
index d0c30ef2..c6c1ddf1 100644
--- a/sources/Experiments/CornellBox/App.cs
+++ b/sources/Experiments/CornellBox/App.cs
@@ -31,13 +31,13 @@ static App()
{
Context = GraphicsContext.CreateDirectX12(useValidationLayer: true);
}
- else if (OperatingSystem.IsLinux())
+ else if (OperatingSystem.IsMacOS())
{
- Context = GraphicsContext.CreateVulkan(useValidationLayer: true);
+ Context = GraphicsContext.CreateMetal(useValidationLayer: true);
}
else
{
- Context = GraphicsContext.CreateMetal(useValidationLayer: true);
+ Context = GraphicsContext.CreateVulkan(useValidationLayer: true);
}
Context.ValidationMessage += static (sender, args) => Console.WriteLine($"[{args.Source} - {args.Severity}] {args.Message}");
@@ -54,13 +54,13 @@ static App()
{
surface = Surface.Win32(window.Native!.Win32!.Value.Hwnd, Width, Height);
}
- else if (OperatingSystem.IsLinux())
+ else if (OperatingSystem.IsMacOS())
{
- surface = Surface.Xlib(window.Native!.X11!.Value.Display, (nint)window.Native.X11.Value.Window, Width, Height);
+ surface = Surface.Apple(CocoaHelper.CreateLayer(window.Native!.Cocoa!.Value), Width, Height);
}
else
{
- surface = Surface.Apple(CocoaHelper.CreateLayer(window.Native!.Cocoa!.Value), Width, Height);
+ surface = Surface.Xlib(window.Native!.X11!.Value.Display, (nint)window.Native.X11.Value.Window, Width, Height);
}
swapChain = Context.CreateSwapChain(new() { Surface = surface, ColorTargetFormat = PixelFormat.B8G8R8A8UNorm, DepthStencilTargetFormat = PixelFormat.D32FloatS8UInt });
diff --git a/sources/Experiments/CornellBox/CONVENTIONS.md b/sources/Experiments/CornellBox/CONVENTIONS.md
index 6b57de1c..e3ee79f6 100644
--- a/sources/Experiments/CornellBox/CONVENTIONS.md
+++ b/sources/Experiments/CornellBox/CONVENTIONS.md
@@ -778,7 +778,7 @@ base (FrameBuffer + DepthStencil + Color)
## DirectX 12 Specific Notes
- `BindingHelper` assigns DirectX 12 register indices by type: CBV(b), SRV(t), UAV(u), Sampler(s) independently numbered
-- Vulkan 1.4 numbers all bindings sequentially; Metal 4 uses argument buffer index
+- Metal 4 uses argument buffer index; Vulkan 1.4 numbers all bindings sequentially
## C# Code Style
From b3b4795883278690f0cf607a3c6c1537313c26ec Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Tue, 31 Mar 2026 21:26:57 +0800
Subject: [PATCH 11/14] Update package tag from Metal4 to Metal in NuGet props
Broadened the
entry in NuGet.Packaging.props by replacing "Metal4" with "Metal" to refer to all versions of Metal, not just version 4. This improves discoverability and accuracy of the package metadata.
---
sources/NuGet.Packaging.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/NuGet.Packaging.props b/sources/NuGet.Packaging.props
index 6325bbfe..6de9ee3e 100644
--- a/sources/NuGet.Packaging.props
+++ b/sources/NuGet.Packaging.props
@@ -20,7 +20,7 @@
Zenith.NET.png
LICENSE
README.md
- DirectX12;Metal4;Vulkan1.4;ImageSharp;ImGui;Skia;Slang;Avalonia;Maui;Uno;WinForms;WinUI;WPF;GPU;Native
+ DirectX12;Metal;Vulkan;ImageSharp;ImGui;Skia;Slang;Avalonia;Maui;Uno;WinForms;WinUI;WPF;GPU;Native
https://qian-o.github.io/Zenith.NET
From 93201bb09b0421555f72463c2191738119e68958 Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Tue, 31 Mar 2026 21:36:48 +0800
Subject: [PATCH 12/14] fix(docs): standardize graphics API naming conventions
in documentation
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 8 ++++----
documents/tutorials/getting-started/prerequisites.md | 10 +++++-----
sources/Experiments/CornellBox/CONVENTIONS.md | 10 +++++-----
sources/NuGet.Packaging.props | 2 +-
4 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index e0dc220f..abc19fb9 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -16,15 +16,15 @@ body:
description: A clear and concise description of what the bug is, including steps to reproduce and expected behavior.
placeholder: |
What happened:
- E.g. When initializing a DirectX 12 context, an exception is thrown on integrated graphics.
+ E.g. When initializing a DirectX12 context, an exception is thrown on integrated graphics.
Steps to reproduce:
- 1. Create a GraphicsContext with DirectX 12
+ 1. Create a GraphicsContext with DirectX12
2. Call CreateSwapChain()
3. See exception
Expected behavior:
- DirectX 12 context should initialize successfully.
+ DirectX12 context should initialize successfully.
- type: textarea
attributes:
@@ -32,7 +32,7 @@ body:
description: Please provide your environment details (if applicable).
placeholder: |
- OS: Windows 11 / macOS 15 / Ubuntu 24.04 / etc.
- - Graphics API: DirectX 12 / Metal 4 / Vulkan 1.4
+ - Graphics API: DirectX12 / Metal / Vulkan
- Zenith.NET Version: 1.0.0
- GPU: NVIDIA RTX 4090 / Apple M3 / etc.
diff --git a/documents/tutorials/getting-started/prerequisites.md b/documents/tutorials/getting-started/prerequisites.md
index 6bf89a7e..bc61952b 100644
--- a/documents/tutorials/getting-started/prerequisites.md
+++ b/documents/tutorials/getting-started/prerequisites.md
@@ -136,9 +136,9 @@ Different graphics backends use different indexing schemes for resource bindings
| Backend | Index Scheme |
|---------|--------------|
-| DirectX 12 | Per-type: CBV, SRV, UAV, Sampler each start at 0 |
-| Metal 4 | Per-category: Buffer, Texture, Sampler each start at 0 |
-| Vulkan 1.4 | Global: All resources share index space (0, 1, 2, ...) |
+| DirectX12 | Per-type: CBV, SRV, UAV, Sampler each start at 0 |
+| Metal | Per-category: Buffer, Texture, Sampler each start at 0 |
+| Vulkan | Global: All resources share index space (0, 1, 2, ...) |
```csharp
namespace ZenithTutorials;
@@ -291,7 +291,7 @@ internal static partial class CocoaHelper
}
```
-The `CAMetalLayer` can be used with both Metal 4 and Vulkan 1.4 backends on macOS.
+The `CAMetalLayer` can be used with both Metal and Vulkan backends on macOS.
## Application Framework
@@ -437,7 +437,7 @@ This framework provides:
- **Platform validation** - Ensures only supported platforms (Windows, macOS, Linux) are used
- **Window creation** with Silk.NET (1280Γ720 default size)
-- **Cross-platform backend selection** (DirectX 12 on Windows, Metal 4 on macOS, Vulkan 1.4 on Linux)
+- **Cross-platform backend selection** (DirectX12 on Windows, Metal on macOS, Vulkan on Linux)
- **SwapChain management** for presenting frames
- **Resize handling** for responsive rendering
- **Generic renderer pattern** using `App.Run()` for easy tutorial switching
diff --git a/sources/Experiments/CornellBox/CONVENTIONS.md b/sources/Experiments/CornellBox/CONVENTIONS.md
index e3ee79f6..95ecf1ee 100644
--- a/sources/Experiments/CornellBox/CONVENTIONS.md
+++ b/sources/Experiments/CornellBox/CONVENTIONS.md
@@ -2,7 +2,7 @@
## Overview
-A dual-mode Cornell Box renderer built on the Zenith.NET multi-backend GPU framework (DirectX 12 / Metal 4 / Vulkan 1.4).
+A dual-mode Cornell Box renderer built on the Zenith.NET multi-backend GPU framework (DirectX12 / Metal / Vulkan).
Two rendering modes switchable via ImGui radio buttons at runtime:
- **Path Tracing** (mode 0): `ComputePipeline` + inline `RayQuery<>`, progressive accumulation with NEE (Next Event Estimation), Cook-Torrance PBR BRDF (GGX + Schlick Fresnel + Smith G), GGX importance sampling for specular, cosine-weighted hemisphere for diffuse, Russian roulette, environment sky light on ray miss. Only available when `Context.Capabilities.RayTracingSupported` is true.
@@ -11,7 +11,7 @@ Two rendering modes switchable via ImGui radio buttons at runtime:
## Current State (2026-03-30)
- All files implemented and compiling successfully
-- DirectX 12 validation layer clean
+- DirectX12 validation layer clean
- Camera initial position: (278, 273, -800), Speed=240, FarPlane=2000, looks into the box
- Swap chain format: B8G8R8A8UNorm color + D32FloatS8UInt depth/stencil
- `Renderer` abstract base class unifies both renderers (`Update` / `Render` / `Resize` + `IDisposable`)
@@ -775,10 +775,10 @@ base (FrameBuffer + DepthStencil + Color)
β constantBuffer β materialBuffer β indexBuffer β vertexBuffer
```
-## DirectX 12 Specific Notes
+## DirectX12 Specific Notes
-- `BindingHelper` assigns DirectX 12 register indices by type: CBV(b), SRV(t), UAV(u), Sampler(s) independently numbered
-- Metal 4 uses argument buffer index; Vulkan 1.4 numbers all bindings sequentially
+- `BindingHelper` assigns DirectX12 register indices by type: CBV(b), SRV(t), UAV(u), Sampler(s) independently numbered
+- Metal uses argument buffer index; Vulkan numbers all bindings sequentially
## C# Code Style
diff --git a/sources/NuGet.Packaging.props b/sources/NuGet.Packaging.props
index 6de9ee3e..cf795345 100644
--- a/sources/NuGet.Packaging.props
+++ b/sources/NuGet.Packaging.props
@@ -10,7 +10,7 @@
0.0.7
qian-o
Copyright (c) 2026 qian-o
- Zenith.NET is a modern, cross-platform graphics and compute library for .NET. It provides a unified GPU programming interface supporting DirectX 12, Metal 4, and Vulkan 1.4 backends.
+ Zenith.NET is a modern, cross-platform graphics and compute library for .NET. It provides a unified GPU programming interface supporting DirectX12, Metal, and Vulkan backends.
Git
From 9b268d51ac342df033a0ebd0de6da003cde02f22 Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Wed, 1 Apr 2026 09:24:43 +0800
Subject: [PATCH 13/14] Add Silk.NET.MoltenVK.Native for MoltenVK support
Added Silk.NET.MoltenVK.Native (v2.23.0) to enable MoltenVK,
improving Vulkan compatibility on macOS. Updated both
Directory.Packages.props and Zenith.NET.Vulkan.csproj to include
the new package dependency.
---
sources/Directory.Packages.props | 1 +
sources/Zenith.NET.Vulkan/Zenith.NET.Vulkan.csproj | 1 +
2 files changed, 2 insertions(+)
diff --git a/sources/Directory.Packages.props b/sources/Directory.Packages.props
index 5929646b..8a77753e 100644
--- a/sources/Directory.Packages.props
+++ b/sources/Directory.Packages.props
@@ -14,6 +14,7 @@
+
diff --git a/sources/Zenith.NET.Vulkan/Zenith.NET.Vulkan.csproj b/sources/Zenith.NET.Vulkan/Zenith.NET.Vulkan.csproj
index 56ad22a6..39132514 100644
--- a/sources/Zenith.NET.Vulkan/Zenith.NET.Vulkan.csproj
+++ b/sources/Zenith.NET.Vulkan/Zenith.NET.Vulkan.csproj
@@ -9,6 +9,7 @@
+
From 7c3790e1695133c359e19757e27a141ab76ab920 Mon Sep 17 00:00:00 2001
From: qian-o <1324771795@qq.com>
Date: Wed, 1 Apr 2026 10:06:23 +0800
Subject: [PATCH 14/14] fix: use history.replaceState for search navigation
---
documents/templates/public/main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/documents/templates/public/main.js b/documents/templates/public/main.js
index f61c827e..fbf12aad 100644
--- a/documents/templates/public/main.js
+++ b/documents/templates/public/main.js
@@ -77,7 +77,7 @@
e.preventDefault();
const query = document.getElementById('search-query')?.value || '';
- history.pushState({ search: true, query }, '');
+ history.replaceState({ search: true, query }, '');
window.location.href = link.href;
});