Class EffectParameterInfo
- Namespace
- ShadowDusk.Core
- Assembly
- ShadowDusk.Core.dll
One .mgfx parameter record. MonoGame 3.8.2's Effect.ReadParameters reads
Elements (array elements) and Members (struct members)
as RECURSIVE parameter collections — elements first, then members, each a full
nested parameter record (mirroring mgfxc's EffectObject.WriteParameter).
A value-typed leaf (Scalar/Vector/Matrix with no elements/members) additionally
carries a raw default-value blob of RowCountColumnCount4 bytes: the
DefaultValue read off the HLSL initializer (float R = 1;), or zeros when
the declaration has none. For an array, each element leaf carries its own blob.
public sealed record EffectParameterInfo : IEquatable<EffectParameterInfo>
- Inheritance
-
EffectParameterInfo
- Implements
- Inherited Members
Constructors
EffectParameterInfo(byte, byte, string, string?, IReadOnlyList<AnnotationInfo>, byte, byte, IReadOnlyList<EffectParameterInfo>, IReadOnlyList<EffectParameterInfo>, byte[]?)
One .mgfx parameter record. MonoGame 3.8.2's Effect.ReadParameters reads
Elements (array elements) and Members (struct members)
as RECURSIVE parameter collections — elements first, then members, each a full
nested parameter record (mirroring mgfxc's EffectObject.WriteParameter).
A value-typed leaf (Scalar/Vector/Matrix with no elements/members) additionally
carries a raw default-value blob of RowCountColumnCount4 bytes: the
DefaultValue read off the HLSL initializer (float R = 1;), or zeros when
the declaration has none. For an array, each element leaf carries its own blob.
public EffectParameterInfo(byte Class, byte Type, string Name, string? Semantic, IReadOnlyList<AnnotationInfo> Annotations, byte RowCount, byte ColumnCount, IReadOnlyList<EffectParameterInfo> Members, IReadOnlyList<EffectParameterInfo> Elements, byte[]? DefaultValue = null)
Parameters
ClassbyteThe MGFX parameter class (Scalar = 0, Vector = 1, Matrix = 2, Object = 3, Struct = 4).
TypebyteThe MGFX parameter type (Bool = 1, Int32 = 2, Single = 3, textures, ...).
NamestringThe parameter name (empty for an array element).
SemanticstringThe semantic, if any.
AnnotationsIReadOnlyList<AnnotationInfo>The annotations declared on the parameter.
RowCountbyteThe row count (1 for a scalar or vector).
ColumnCountbyteThe column count (1 for a scalar).
MembersIReadOnlyList<EffectParameterInfo>Struct members, each a full nested record.
ElementsIReadOnlyList<EffectParameterInfo>Array elements, each a full nested record.
DefaultValuebyte[]The default blob of a value-typed leaf, in the layout MonoGame's
EffectParameter.Dataholds (a matrix column by column), or null for zeros. When set it must be exactlyRowCountColumnCount4bytes; the writers refuse any other length.
Properties
Annotations
The annotations declared on the parameter.
public IReadOnlyList<AnnotationInfo> Annotations { get; init; }
Property Value
Class
The MGFX parameter class (Scalar = 0, Vector = 1, Matrix = 2, Object = 3, Struct = 4).
public byte Class { get; init; }
Property Value
ColumnCount
The column count (1 for a scalar).
public byte ColumnCount { get; init; }
Property Value
DefaultValue
The default blob of a value-typed leaf, in the layout MonoGame's EffectParameter.Data
holds (a matrix column by column), or null for zeros. When set it must be exactly
RowCountColumnCount4 bytes; the writers refuse any other length.
public byte[]? DefaultValue { get; init; }
Property Value
- byte[]
Elements
Array elements, each a full nested record.
public IReadOnlyList<EffectParameterInfo> Elements { get; init; }
Property Value
Members
Struct members, each a full nested record.
public IReadOnlyList<EffectParameterInfo> Members { get; init; }
Property Value
Name
The parameter name (empty for an array element).
public string Name { get; init; }
Property Value
RowCount
The row count (1 for a scalar or vector).
public byte RowCount { get; init; }
Property Value
Semantic
The semantic, if any.
public string? Semantic { get; init; }
Property Value
Type
The MGFX parameter type (Bool = 1, Int32 = 2, Single = 3, textures, ...).
public byte Type { get; init; }