ShadowDusk.SkSL
0.26.0
dotnet add package ShadowDusk.SkSL --version 0.26.0
NuGet\Install-Package ShadowDusk.SkSL -Version 0.26.0
<PackageReference Include="ShadowDusk.SkSL" Version="0.26.0" />
<PackageVersion Include="ShadowDusk.SkSL" Version="0.26.0" />
<PackageReference Include="ShadowDusk.SkSL" />
paket add ShadowDusk.SkSL --version 0.26.0
#r "nuget: ShadowDusk.SkSL, 0.26.0"
#:package ShadowDusk.SkSL@0.26.0
#addin nuget:?package=ShadowDusk.SkSL&version=0.26.0
#tool nuget:?package=ShadowDusk.SkSL&version=0.26.0
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 | Versions 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. |
-
net10.0
- ShadowDusk.Core (>= 0.26.0)
- ShadowDusk.ShaderToy (>= 0.26.0)
-
net8.0
- ShadowDusk.Core (>= 0.26.0)
- ShadowDusk.ShaderToy (>= 0.26.0)
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 |