ShadowDusk.SkSL 0.26.0

dotnet add package ShadowDusk.SkSL --version 0.26.0
                    
NuGet\Install-Package ShadowDusk.SkSL -Version 0.26.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="ShadowDusk.SkSL" Version="0.26.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ShadowDusk.SkSL" Version="0.26.0" />
                    
Directory.Packages.props
<PackageReference Include="ShadowDusk.SkSL" />
                    
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 ShadowDusk.SkSL --version 0.26.0
                    
#r "nuget: ShadowDusk.SkSL, 0.26.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.
#:package ShadowDusk.SkSL@0.26.0
                    
#: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=ShadowDusk.SkSL&version=0.26.0
                    
Install as a Cake Addin
#tool nuget:?package=ShadowDusk.SkSL&version=0.26.0
                    
Install as a Cake Tool

ShadowDusk.SkSL

A pure-managed, zero-native converter that turns a Skia SkSL runtime-effect shader (half4 main(float2 coord)) into a self-contained HLSL .fx source you can compile for MonoGame, KNI, or FNA. uniform shader children become textures, uniform int/bool become float parameters, and unsupported SkSL fails with a coded diagnostic (SD0660 to SD0673) that says what to change.

Standalone and optional: it is not part of ShadowDusk's faithful mgfxc-replacement pipeline, and ShadowDusk.Compiler does not depend on it. It depends on ShadowDusk.ShaderToy (installed with it) and ShadowDusk.Core.

Usage

With ShadowDusk.Compiler installed beside it, ShaderConverter reads SkSL with no setup. SkSL text has no marker, so name the source with a .sksl hint:

var result = ShaderConverter.Compile(new EffectCompiler(), skslSource,
    new CompilerOptions { Target = PlatformTarget.OpenGL }, "tint.sksl");

Or convert on its own and compile the .fx yourself:

using ShadowDusk.ShaderToy;
using ShadowDusk.SkSL;

ConvertResult result = SkSLToFxConverter.Convert(skslSource);
if (!result.Success)
    foreach (ConvertDiagnostic d in result.Diagnostics)
        Console.Error.WriteLine($"{d.Code} ({d.Line},{d.Column}): {d.Message}");

A trimmed application that cannot have the assembly loaded by name calls SkSLFrontend.Register() itself. SkSLToFxConverter documents the host contract (SpriteBatch, iResolution, child texture and texel-size parameters, the premultiplied and straight-alpha techniques).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (3)

Showing the top 3 NuGet packages that depend on ShadowDusk.SkSL:

Package Downloads
Gum.FNA.ShadowDusk

Package Description

Gum.MonoGame.ShadowDusk

Package Description

Gum.KNI.ShadowDusk

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.26.0 405 11/15/2026