Class CapabilityProfile
- Namespace
- ShadowDusk.Core
- Assembly
- ShadowDusk.Core.dll
A named, render-proven runtime contract: a validated point in ShadowDusk's capability space (the effect EffectContainer + MgfxVersion "format" axis and the GL ShaderDialect; later, allowed GL features). The closed set spans every (runtime, format) cell ShadowDusk targets, so one profile names a full contract.
public sealed class CapabilityProfile
- Inheritance
-
CapabilityProfile
- Inherited Members
Remarks
This is a closed set, not an open cross-product. The constructor is private and the only
instances are the static readonly members below, each rung-4 proven against a specific
runtime. That is deliberate: it keeps "give the consumer the newest best experience" from
degrading into "emit an untested combination of bytes." A consumer cannot invent an anonymous
profile, so the compiler can never be asked for a tuple no runtime honors.
The axis is additive and optional: Profile defaults to null, which reproduces today's behavior exactly (the dialect is derived from Target). An explicit profile only refines that behavior; it never becomes a flag a consumer must set to get correct output. The effect container stays the separate EffectContainer / MgfxVersion axis.
Fields
Fna_Fx2
FNA, the D3D9 fx_2_0 .fxb container (SM1-3). No GL dialect; render-proven in real FNA
via MojoShader (Phase 39/40). Container/version fields are inert for the FNA target.
public static readonly CapabilityProfile Fna_Fx2
Field Value
KniGL_4_02
KNI OpenGL, the KNIFX v11 container, MojoShader-dialect GLSL. KNI v4.02+. The corpus
is render-proven in real KNI v4.2.9001 (validation/KniDesktopGL knifx, maxd 0 vs v10);
the KNIFX-specific fixes (optimized Matrix4x4, sampler-without-texture) are still
pending validation against a KNIFXC golden. Opt-in / additive (the default stays v10).
public static readonly CapabilityProfile KniGL_4_02
Field Value
MonoGameDX_SM5
MonoGame / KNI DirectX 11, MGFX v10, DXBC SM5. No GL dialect (DXBC bytecode); render-proven in real MonoGame WindowsDX (Phase 18).
public static readonly CapabilityProfile MonoGameDX_SM5
Field Value
MonoGameGL_3_8_2
MonoGame / KNI OpenGL (DesktopGL / WebGL), MGFX v10, MojoShader-dialect GLSL. The default GL contract; render-proven in real MonoGame (Phase 17/28/43) and KNI v4.02 desktop.
public static readonly CapabilityProfile MonoGameGL_3_8_2
Field Value
MonoGameGL_3_8_5
MonoGame OpenGL, MGFX v11, MojoShader-dialect GLSL. The 3.8.5+ container (the v10
body plus the per-shader SourceFile/Entrypoint strings). Render-proven in real MonoGame
3.8.5 (validation/MonoGameV11); opt-in (3.8.5 is pre-release, the default stays v10).
public static readonly CapabilityProfile MonoGameGL_3_8_5
Field Value
Properties
AllowedFeatures
The GL features this profile permits beyond the MojoShader baseline. Every current proven profile declares None; a feature is only honored once a runtime is render-proven to consume it (enforced by ShaderFeatureSupport).
public ShaderFeatures AllowedFeatures { get; }
Property Value
Container
The effect container this profile emits (Mgfx or
Knifx). Together with MgfxVersion this is the
"format" axis, so one profile fully specifies a (runtime, format) contract. Ignored for
Fna (always the D3D9 fx_2_0 .fxb).
public EffectContainer Container { get; }
Property Value
Dialect
The GL dialect this profile emits. NotApplicable for non-GL contracts.
public ShaderDialect Dialect { get; }
Property Value
GraphicsTarget
The graphics backend this profile targets (OpenGL, DirectX, or Fna). A profile fully specifies the output target, so when Profile is set this wins over Target: selecting a profile alone picks both format and backend (this is what lets RuntimeProfileDetector return one profile that chooses everything).
public PlatformTarget GraphicsTarget { get; }
Property Value
MgfxVersion
The MGFX container version (10 or 11). Ignored when Container is Knifx (KNIFX carries its own version) and for Fna.
public int MgfxVersion { get; }
Property Value
Name
The stable, human-readable identifier (also what ToString() returns).
public string Name { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.