Table of Contents

Class RenderStateParser

Namespace
ShadowDusk.Core
Assembly
ShadowDusk.Core.dll

Parses the render-state assignments inside an FX pass block into a typed RenderStateBlock. Recognized states map to nullable fields (left unset when absent in the source); states fxc accepts but FNA's runtime would throw on are recorded in KnownFnaThrowingStates so the FNA path can fail loudly while the MGFX paths preserve fxc/mgfxc's silent-ignore behavior.

public sealed class RenderStateParser
Inheritance
RenderStateParser
Inherited Members

Methods

Parse(IReadOnlyDictionary<string, string>)

Parses a pass's render-state assignments into a typed RenderStateBlock.

public Result<RenderStateBlock, ShaderError> Parse(IReadOnlyDictionary<string, string> kvp)

Parameters

kvp IReadOnlyDictionary<string, string>

The raw state = value pairs collected from the pass block.

Returns

Result<RenderStateBlock, ShaderError>

The populated RenderStateBlock on success, or a ShaderError when a recognized state has an unparseable value.