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
FormatShaderFormatThe recognized format, or Unknown.
IsAmbiguousboolTrue when the source carries the signals of two formats that cannot both be right (an HLSL
techniqueblock 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.ReasonstringOne sentence saying which signal decided the result, for diagnostics.
Properties
Format
The recognized format, or Unknown.
public ShaderFormat Format { get; init; }
Property Value
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
IsRecognized
public bool IsRecognized { get; }
Property Value
Reason
One sentence saying which signal decided the result, for diagnostics.
public string Reason { get; init; }