Table of Contents

Struct ShaderFormatDetection

Namespace
ShadowDusk.Core
Assembly
ShadowDusk.Core.dll

The result of Detect(string, string?).

public readonly record struct ShaderFormatDetection : IEquatable<ShaderFormatDetection>
Implements
Inherited Members

Constructors

ShaderFormatDetection(ShaderFormat, bool, string)

The result of Detect(string, string?).

public ShaderFormatDetection(ShaderFormat Format, bool IsAmbiguous, string Reason)

Parameters

Format ShaderFormat

The recognized format, or Unknown.

IsAmbiguous bool

True when the source carries the signals of two formats that cannot both be right (an HLSL technique block and a GLSL entry point) and no name hint settled it. Format is then Unknown. Ambiguous input is a real error to report, never a reason to hand the shader to something else.

Reason string

One sentence saying which signal decided the result, for diagnostics.

Properties

Format

The recognized format, or Unknown.

public ShaderFormat Format { get; init; }

Property Value

ShaderFormat

IsAmbiguous

True when the source carries the signals of two formats that cannot both be right (an HLSL technique block and a GLSL entry point) and no name hint settled it. Format is then Unknown. Ambiguous input is a real error to report, never a reason to hand the shader to something else.

public bool IsAmbiguous { get; init; }

Property Value

bool

IsRecognized

True when a format was recognized (Format is not Unknown).

public bool IsRecognized { get; }

Property Value

bool

Reason

One sentence saying which signal decided the result, for diagnostics.

public string Reason { get; init; }

Property Value

string