Ahwoo.BRUTAL.ShaderC
2026.10.2
Prefix Reserved
dotnet add package Ahwoo.BRUTAL.ShaderC --version 2026.10.2
NuGet\Install-Package Ahwoo.BRUTAL.ShaderC -Version 2026.10.2
<PackageReference Include="Ahwoo.BRUTAL.ShaderC" Version="2026.10.2" />
<PackageVersion Include="Ahwoo.BRUTAL.ShaderC" Version="2026.10.2" />
<PackageReference Include="Ahwoo.BRUTAL.ShaderC" />
paket add Ahwoo.BRUTAL.ShaderC --version 2026.10.2
#r "nuget: Ahwoo.BRUTAL.ShaderC, 2026.10.2"
#:package Ahwoo.BRUTAL.ShaderC@2026.10.2
#addin nuget:?package=Ahwoo.BRUTAL.ShaderC&version=2026.10.2
#tool nuget:?package=Ahwoo.BRUTAL.ShaderC&version=2026.10.2
Brutal ShaderC
C# bindings for shaderc, a shader compilation library, for use with the BRUTAL framework.
Brutal ShaderC wraps Google's shaderc library, enabling compilation of GLSL and HLSL shaders to SPIR-V from .NET. Use it to compile shaders at runtime or as part of a build pipeline, with support for #include resolution, preprocessor macro definitions, and compiler options such as optimisation level and target environment.
Platform Support
- Windows (x64)
- Linux (x64)
- macOS (Apple Silicon)
Links
NuGet Packages
- Ahwoo.BRUTAL.ShaderC - C# bindings for the shaderc shader compilation library
For Users
Prerequisites
- .NET SDK (version 10.0 or later)
Installation
To install the package via NuGet, run the following command in your project directory:
dotnet add package Ahwoo.BRUTAL.ShaderC
Usage
Compile a GLSL vertex shader to SPIR-V:
using var compiler = ShaderC.CreateCompiler();
using var options = ShaderC.CreateCompilerOptions();
options.SetDefaultIncludeCallbacks();
var glsl = "#version 450\nvoid main() { gl_Position = vec4(0, 0, 0, 1); }"u8;
using var result = compiler.CompileIntoSpv(
glsl, ShaderKind.VertexShader, "shader.vert"u8, "main"u8, options
);
if (result.CompilationStatus == CompilationStatus.Success)
{
ReadOnlySpan<byte> spirv = result.GetBytes();
// Upload SPIR-V bytes to the GPU...
}
Please refer to the BRUTAL Documentation for more detailed usage instructions and examples.
For Developers
Prerequisites
- .NET SDK (version 10.0 or later)
- Just
- CMake
- Ninja
- Python
- A C++ compiler:
- Windows: Visual Studio 2022 (x64)
- Linux: GCC (x64)
- Mac: Xcode and Xcode Command Line Tools (Apple Silicon)
Compilation and Testing
To build the solution locally, run the following command in the repository root:
just build
To run the tests, run the following command in the repository root:
just test
Contributing
If you find a bug or have a feature request, please open an issue on GitHub. If you'd like to contribute code, feel free to fork the repository and submit a pull request.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Ahwoo.BRUTAL.Interop (>= 2026.10.1)
- Ahwoo.BRUTAL.Memory (>= 2026.10.1)
- Ahwoo.BRUTAL.Strings (>= 2026.10.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.10.2 | 2,403 | 10/15/2026 |
Rebuilds against Strings 2026.10.1 and the packages released on it. The previous 2026.10 release still pulled Brutal.T4 in through Strings 2026.10.0; this one no longer does.
No public API changes.
**Full Changelog:** [v2026.10.1...v2026.10.2](https://github.com/RocketWerkz/brutal.shaderc/compare/v2026.10.1...v2026.10.2)