ShadowDusk.ShaderToy 0.11.0

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

ShadowDusk.ShaderToy

A pure-managed, zero-native converter that turns a ShaderToy (or plain-GLSL) fragment shader into a self-contained HLSL .fx source you can compile for MonoGame, KNI, or FNA.

It accepts both entry conventions and auto-detects them (no flag): a ShaderToy void mainImage(out vec4 fragColor, in vec2 fragCoord) shader, and a plain-GLSL void main() fragment shader that writes gl_FragColor / a user-declared out vec4 and reads gl_FragCoord. Unsupported constructs fail loudly with a located diagnostic (line/column) rather than producing a silently-wrong .fx.

This package is standalone and optional — it is not part of ShadowDusk's faithful mgfxc-replacement pipeline, and ShadowDusk.Compiler does not depend on it. Install it when you want to convert ShaderToy/GLSL shaders in-process (e.g. a web shader fiddle or an in-app importer). To then compile the resulting .fx, use ShadowDusk.Compiler (in-process library) or ShadowDusk.Cli (the ShadowDuskCLI tool, which also accepts .glsl input directly).

Usage

using ShadowDusk.ShaderToy;

ConvertResult result = ShaderToyConverter.Convert(glslSource);

if (result.Success)
{
    string fx = result.Fx!;          // self-contained HLSL .fx source
    // result.UsedUniforms lists the ShaderToy built-ins (iTime, iChannel0, …)
    // plus any custom uniforms the shader drives each frame.
}
else
{
    foreach (ConvertDiagnostic d in result.Diagnostics)
        Console.Error.WriteLine($"{d.Severity} ({d.Line},{d.Column}): {d.Message}");
}

A batch multipass entry point (MultipassConverter.Convert) converts a ShaderToy multi-tab export (Buffer A-D + Image) into one .fx per pass plus a machine-readable wiring manifest; you drive the render graph yourself with MonoGame render targets (the converter accepts the syntax, it is not a ShaderToy runtime).

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 was computed.  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.
  • net8.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
0.11.0 43 6/29/2026
0.10.0 42 6/28/2026
0.9.0 66 6/22/2026