Class VariableReflection
- Namespace
- ShadowDusk.Core.Reflection
- Assembly
- ShadowDusk.Core.dll
A single variable packed inside a ConstantBufferReflection: its name, byte layout within the buffer, type shape, and (for structs) nested members.
public sealed record VariableReflection : IEquatable<VariableReflection>
- Inheritance
-
VariableReflection
- Implements
- Inherited Members
Properties
Columns
The number of columns (matrices and vectors); 1 for scalars.
public required int Columns { get; init; }
Property Value
Elements
The array element count; 1 when not an array.
public required int Elements { get; init; }
Property Value
Members
For struct variables, the nested member variables; otherwise null.
public IReadOnlyList<VariableReflection>? Members { get; init; }
Property Value
Name
The variable's name.
public required string Name { get; init; }
Property Value
ParameterClass
The variable's shape class (scalar, vector, matrix, …).
public required EffectParameterClass ParameterClass { get; init; }
Property Value
ParameterType
The variable's element type.
public required EffectParameterType ParameterType { get; init; }
Property Value
Rows
The number of rows (matrices and vectors); 1 for scalars.
public required int Rows { get; init; }
Property Value
SizeBytes
The variable's size in bytes.
public required int SizeBytes { get; init; }
Property Value
StartOffset
The variable's byte offset from the start of its constant buffer.
public required int StartOffset { get; init; }