This project provides:
- A library
XenoAtom.ShaderCompiler
that exposes higher-level integration of shaderc to compile HLSL/GLSL shaders. - A tool
dotnet-shaderc
the equivalent ofglslc
that can be installed on any machine that has the .NET 8 SDK - A MSBuild integration via
XenoAtom.ShaderCompiler.Build
that allows to compile shaders to SPIR-V binary files, embed them directly in C# (via a built-in Source Generator) or generatestar
/tar.gz
files.
- Supports most features of shaderc.
- Support for include directories.
- Multithreaded shader compiler.
dotnet-shaderc
is a .NET Tool equivalent ofglslc
that can be installed on any machine that has the .NET 8 SDK- The package
XenoAtom.ShaderCompiler.Build
allows to integrate in your C# or any MSBuild projects the compilation of HLSL/GLSL shaders.- C# source generator supports embedding SPIR-V binary returned as
ReadOnlySpan<byte>
(Default mode for C# projects). - Can generate
tar
/tar.gz
files to collect all compiled shaders. - Can copy SPIR-V files as-is to the output folder shipped with your library/app.
- Incremental compiler that detects includes and dependencies to only compile relevant changes.
- C# source generator supports embedding SPIR-V binary returned as
For more details on how to use XenoAtom.ShaderCompiler, please visit the user guide.
This software is released under the BSD-2-Clause license.
Alexandre Mutel aka xoofx.