This project provides:
- A library
XenoAtom.ShaderCompilerthat exposes higher-level integration of shaderc to compile HLSL/GLSL shaders. - A tool
dotnet-shadercthe equivalent ofglslcthat can be installed on any machine that has the .NET 8 SDK - A MSBuild integration via
XenoAtom.ShaderCompiler.Buildthat allows to compile shaders to SPIR-V binary files, embed them directly in C# (via a built-in Source Generator) or generatestar/tar.gzfiles.
- Supports most features of shaderc.
- Support for include directories.
- Multithreaded shader compiler.
dotnet-shadercis a .NET Tool equivalent ofglslcthat can be installed on any machine that has the .NET 8 SDK- The package
XenoAtom.ShaderCompiler.Buildallows 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.gzfiles 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.
