XenoAtom.ShaderCompiler [](https://github.com/XenoAtom/XenoAtom.ShaderCompiler/actions/workflows/ci.yml)

June 20, 2024 ยท View on GitHub

This project provides:

  • A library XenoAtom.ShaderCompiler that exposes higher-level integration of shaderc to compile HLSL/GLSL shaders. NuGet
  • A tool dotnet-shaderc the equivalent of glslc that can be installed on any machine that has the .NET 8 SDK NuGet
  • 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 generates tar/tar.gz files. NuGet

โœจ Features

  • Supports most features of shaderc.
    • Support for include directories.
  • Multithreaded shader compiler.
  • dotnet-shaderc is a .NET Tool equivalent of glslc 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.

๐Ÿ“– User Guide

For more details on how to use XenoAtom.ShaderCompiler, please visit the user guide.

๐Ÿชช License

This software is released under the BSD-2-Clause license.

๐Ÿค— Author

Alexandre Mutel aka xoofx.