XenoAtom.ShaderCompiler.Build 1.1.0

Prefix Reserved
dotnet add package XenoAtom.ShaderCompiler.Build --version 1.1.0                
NuGet\Install-Package XenoAtom.ShaderCompiler.Build -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XenoAtom.ShaderCompiler.Build" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XenoAtom.ShaderCompiler.Build --version 1.1.0                
#r "nuget: XenoAtom.ShaderCompiler.Build, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XenoAtom.ShaderCompiler.Build as a Cake Addin
#addin nuget:?package=XenoAtom.ShaderCompiler.Build&version=1.1.0

// Install XenoAtom.ShaderCompiler.Build as a Cake Tool
#tool nuget:?package=XenoAtom.ShaderCompiler.Build&version=1.1.0                

XenoATom.ShaderCompiler.Build ci

This package allows to automatically compile all your HLSL/GLSL files in your MSBuild projects to SPIR-V binaries.

If your project is C#, it will be able to embed the generated SPIR-V binaries into your source code directly.

For example, suppose that you have a C# project HelloWorld with a Test.vert.hlsl file:

#pragma shader_stage(vertex)
float4 main(float2 pos : POSITION) : SV_POSITION
{
    return float4(pos, 0, 1);
}

It will generate the following embedded code accessible directly from your C# project:

using System;

namespace HelloWorld
{
    internal static partial class CompiledShaders
    {
        #if NET5_0_OR_GREATER || NETSTANDARD2_1
        public static ReadOnlySpan<byte> Test_vert_hlsl => new byte[]
        #else
        public static readonly byte[] Test_vert_hlsl = new byte[]
        #endif
        {
            3, 2, 35, 7, 0, 0, 1, 0, 11, 0, 13, 0, 38, 0, 0, 0, 0, 0, 0, 0, 17, 0, 2, 0, 1, 0, 0, 0, 11, 0, 6, 0, 1, 0, 0, 0, 71, 76, 83, 76, 46, 115, 116, 100, 46, 52, 53, 48, 0, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 15, 0, 7, 0, 0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 1, 0, 56, 0, 1, 0
        };
    }
}

📖 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.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

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
1.1.0 242 6/21/2024
1.0.0 164 6/20/2024