API Reference
This reference is generated by DocFX from the XML doc-comments in the four plain
net8.0 library projects that make up the compiler:
| Assembly | What lives here |
|---|---|
| ShadowDusk.Core | The consumer contract and shared types: IShaderCompiler, CompilerOptions, CompiledShader, ShaderError, PlatformTarget, the Result<T, TError> discriminated union, the .mgfx writer, and the reflection / preprocessor families. Start here — this is the public API a consumer touches. |
| ShadowDusk.Compiler | EffectCompiler — the product entry point, an IShaderCompiler that orchestrates the full pipeline. |
| ShadowDusk.HLSL | The FX9 pre-parser, preprocessor, DXC integration, HLSL reflection, and the vkd3d-shader / d3dcompiler_47 DXBC backends. Mostly contributor-facing internals. |
| ShadowDusk.GLSL | The SPIR-V → GLSL transpiler (ISpirvToGlslTranspiler / SpirvCrossGlslTranspiler) and the MonoGameGlslRewriter MojoShader-dialect rewrite. |
What is not in this reference
ShadowDusk.Wasm(the in-browserWasmShaderCompiler) targetsnet8.0-browserand uses the Razor/Blazor SDK plus adxcompiler.wasmbuild gate, which make Roslyn metadata extraction fragile in CI. It is documented conceptually in In-Browser (KNI/Blazor WASM) and WASM In-Browser Frontend.ShadowDusk.Clihas no public API surface —mgfxcis a CLI contract, documented on the CLI Reference page.ShadowDusk.Metal(MslEmitter) andShadowDusk.MgcbPluginare stubs ("future / not implemented") and are excluded from the reference. See Metal (future) and MGCB Content Pipeline.
Where to start
For the consumer story, read the In-Memory Quickstart first, then browse IShaderCompiler and EffectCompiler.