BSGameLib.Game.ShaderCompiler 1.0.4-preview

This is a prerelease version of BSGameLib.Game.ShaderCompiler.
dotnet add package BSGameLib.Game.ShaderCompiler --version 1.0.4-preview
                    
NuGet\Install-Package BSGameLib.Game.ShaderCompiler -Version 1.0.4-preview
                    
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="BSGameLib.Game.ShaderCompiler" Version="1.0.4-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BSGameLib.Game.ShaderCompiler" Version="1.0.4-preview" />
                    
Directory.Packages.props
<PackageReference Include="BSGameLib.Game.ShaderCompiler" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BSGameLib.Game.ShaderCompiler --version 1.0.4-preview
                    
#r "nuget: BSGameLib.Game.ShaderCompiler, 1.0.4-preview"
                    
#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.
#:package BSGameLib.Game.ShaderCompiler@1.0.4-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BSGameLib.Game.ShaderCompiler&version=1.0.4-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BSGameLib.Game.ShaderCompiler&version=1.0.4-preview&prerelease
                    
Install as a Cake Tool

BSGameLib.Game.ShaderCompiler

Compiles GLSL to SPIR-V at runtime for BSGameLib.Game's Vulkan renderer, for shaders the build never saw: read from a file, downloaded, or generated while the game runs. Compiled shaders are cached on disk.

Most games don't need it: BSGameLib.Game compiles a game's shaders at build. It is a separate package because shaderc's native library adds several megabytes per platform. Without it, a shader with no precompiled SPIR-V is reported once: sprites and shapes that use it are drawn without its shader, and a full-screen effect that uses it throws.

using BSGameLib.Game;
using BSGameLib.Game.ShaderCompiler;
using Microsoft.Extensions.DependencyInjection;

public class MyGame : Game
{
  protected override void Configure(IServiceCollection services) =>
    services.AddShaderCompiler(options => options.CacheDirectory = "shader-cache");
}

The cache is on by default, in BSGameLib/ShaderCache under the local application data folder, shared between games.

Documentation: https://docs.burningstormstudios.com/

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.4-preview 48 11/9/2026