Table of Contents

Class SamplerReflection

Namespace
ShadowDusk.Core.Reflection
Assembly
ShadowDusk.Core.dll

A reflected sampler binding: its name, bind slot, and associated texture.

public sealed record SamplerReflection : IEquatable<SamplerReflection>
Inheritance
SamplerReflection
Implements
Inherited Members

Properties

ArrayLength

The declared element count when the sampler is an ARRAY of samplers (SamplerState S[N]; 0 for an unbounded array), or null for a single sampler. See ArrayLength (issue #324).

public int? ArrayLength { get; init; }

Property Value

int?

BindSlot

The sampler's bind slot. Same meaning per reflection as BindSlot: the register from DXIL or DXBC, the position in binding order from the SPIR-V reflector, and RawBinding - 32 on the Vulkan target.

public required int BindSlot { get; init; }

Property Value

int

IsCombined

True when this sampler and its texture are one combined SPIR-V resource (OpTypeSampledImage, from a legacy sampler2D-style declaration) rather than two separate resources (modern Texture2D + SamplerState). Used only by the Vulkan container's descriptor-layout table.

public bool IsCombined { get; init; }

Property Value

bool

Name

The sampler's name.

public required string Name { get; init; }

Property Value

string

RawBinding

The raw SPIR-V Binding decoration (unlike BindSlot). Used by the Vulkan target, for the container's descriptor-layout table and to derive the slot. Default 0 for a DXIL or DXBC reflection.

public int RawBinding { get; init; }

Property Value

int

RawDescriptorSet

The raw SPIR-V DescriptorSet decoration. See RawBinding.

public int RawDescriptorSet { get; init; }

Property Value

int

TextureName

The name of the texture this sampler is paired with, if known.

public string? TextureName { get; init; }

Property Value

string