Table of Contents

Enum PlatformTarget

Namespace
ShadowDusk.Core
Assembly
ShadowDusk.Core.dll

The consumer runtime/loader an effect is compiled for. Each target is a distinct emitted artifact loaded by a different runtime path, so a shader must be compiled (and validated) per target.

public enum PlatformTarget

Fields

DirectX = 0

DirectX 11 (Windows). Emits DXBC (SM ≤ 5) via the vkd3d-shader backend (cross-platform) or the Windows-only d3dcompiler_47 oracle — never DXC, which emits only SM6 DXIL.

DirectX12 = 5

DirectX 12 (Windows). Emits a .mgfx carrying SM6 DXIL directly (MGFX profile byte 2, matching MonoGame 3.8.5's DirectX12ShaderProfile — never this enum ordinal), compiled by DXC with no -spirv and no -Zpr (HLSL's default column-major packing, matching the reference compiler's /Zpc). MonoGame-only (KNI ships no DX12 platform), Windows desktop WindowsDX12 runtime only (not Xbox, which reports a distinct shader profile). Phase 54.

Fna = 4

FNA (the XNA4 reimplementation). Emits the legacy D3D9 Effects Framework binary ("fx_2_0", version token 0xFEFF0901, conventional extension .fxb) with embedded SM1–3 bytecode compiled by vkd3d-shader's D3D_BYTECODE backend. FNA parses it at load time via FNA3D/MojoShader — one artifact serves every FNA graphics backend, so this is the only FNA member. MgfxVersion and DxbcBackend are ignored for this target.

Metal = 2

Metal (macOS/iOS). Not yet implemented — reserved for a future backend.

OpenGL = 1

OpenGL / DesktopGL / WebGL. Emits GLSL via DXC → SPIR-V → SPIRV-Cross → managed MojoShader-dialect rewrite. The default library target.

Vulkan = 3

Vulkan. Emits a .mgfx carrying SPIR-V directly (MGFX profile byte 80, matching MonoGame 3.8.5's VulkanShaderProfile — never this enum ordinal), render-proven end-to-end on real MonoGame 3.8.5 DesktopVK (Phase 32). MonoGame-only: KNI ships no Vulkan platform.