Class TextureReflection
- Namespace
- ShadowDusk.Core.Reflection
- Assembly
- ShadowDusk.Core.dll
A reflected texture binding: its name, bind slot, and dimensionality.
public sealed record TextureReflection : IEquatable<TextureReflection>
- Inheritance
-
TextureReflection
- Implements
- Inherited Members
Properties
ArrayLength
The declared element count when the texture is an ARRAY of textures
(Texture2D Tex[N]; 0 for an unbounded array), or null for a
single texture. One texture declaration in HLSL, N resource slots in the shader. A
SPIR-V reflection sets it from the OpTypeArray wrapping the image type, so a
1-element array is still reported; a DXIL/DXBC reflection sets it from the binding's
BindCount when that is above 1 (issue #324).
public int? ArrayLength { get; init; }
Property Value
- int?
BindSlot
The texture's bind slot. A DXIL or DXBC reflection reports the register (t1 is 1).
The SPIR-V reflector reports the texture's position among the stage's textures in
binding order (0, 1, 2, ...); on the Vulkan target the compiler replaces that with
RawBinding - 32, the slot mgfxc writes and MonoGame's Vulkan runtime reads, which
is the register again.
public required int BindSlot { get; init; }
Property Value
Dimension
The texture's dimensionality (2D, cube, 3D, …).
public required TextureDimension Dimension { get; init; }
Property Value
IsStorage
True when the texture is a read-write (storage) image, an HLSL RWTexture*. Set by the
SPIR-V reflection from OpTypeImage's Sampled operand (2); false from DXIL/DXBC.
public bool IsStorage { get; init; }
Property Value
Name
The texture's name.
public required string Name { get; init; }
Property Value
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
RawDescriptorSet
The raw SPIR-V DescriptorSet decoration. See RawBinding.
public int RawDescriptorSet { get; init; }