Table of Contents

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

int

Elements

The array element count; 1 when not an array.

public required int Elements { get; init; }

Property Value

int

Members

For struct variables, the nested member variables; otherwise null.

public IReadOnlyList<VariableReflection>? Members { get; init; }

Property Value

IReadOnlyList<VariableReflection>

Name

The variable's name.

public required string Name { get; init; }

Property Value

string

ParameterClass

The variable's shape class (scalar, vector, matrix, …).

public required EffectParameterClass ParameterClass { get; init; }

Property Value

EffectParameterClass

ParameterType

The variable's element type.

public required EffectParameterType ParameterType { get; init; }

Property Value

EffectParameterType

Rows

The number of rows (matrices and vectors); 1 for scalars.

public required int Rows { get; init; }

Property Value

int

SizeBytes

The variable's size in bytes.

public required int SizeBytes { get; init; }

Property Value

int

StartOffset

The variable's byte offset from the start of its constant buffer.

public required int StartOffset { get; init; }

Property Value

int