Table of Contents

Class EffectDescriptorSetReflection

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

A reflection object that describes the Descriptor Sets and their layouts for an Effect / Shader based on reflection data extracted from its bytecode.
This includes the bindings for Graphics Resources such as Textures, Buffers, and Sampler States.

public class EffectDescriptorSetReflection
Inheritance
object
EffectDescriptorSetReflection
Extension Methods

Methods

AddLayout(string, DescriptorSetLayoutBuilder)

Adds a new Descriptor Set layout for the given name.

public void AddLayout(string descriptorSetName, DescriptorSetLayoutBuilder descriptorSetLayoutBuilder)

Parameters

descriptorSetName string

The slot name given to the Descriptor Set layout in the Effect / Shader.

descriptorSetLayoutBuilder DescriptorSetLayoutBuilder

A DescriptorSetLayoutBuilder that describes the Graphics Resource bindings and their associated metadata and layout.

GetLayout(string)

Gets the layout of the Descriptor Set with the given name.

public DescriptorSetLayoutBuilder? GetLayout(string name)

Parameters

name string

The name of the Descriptor Set.

Returns

DescriptorSetLayoutBuilder

A DescriptorSetLayoutBuilder object that describes the Graphics Resource bindings and their layout in the Descriptor Set with the provided name, or null if no Descriptor Set with that name exists.

GetLayoutIndex(string)

Gets the index of the Descriptor Set with the given name.

public int GetLayoutIndex(string name)

Parameters

name string

The name of the Descriptor Set.

Returns

int

The zero-based index of the Descriptor Set with the provided name, or -1 if no Descriptor Set with that name exists.

New(GraphicsDevice, EffectBytecode, List<string>, string)

Creates a new Effect Descriptor Set reflection object.

public static EffectDescriptorSetReflection New(GraphicsDevice graphicsDevice, EffectBytecode effectBytecode, List<string> effectDescriptorSetSlots, string defaultSetSlot)

Parameters

graphicsDevice GraphicsDevice

The Graphics Device used to create Sampler States and manage bindings.

effectBytecode EffectBytecode

The Effect / Shader bytecode containing reflection data for resource bindings and Sampler States.

effectDescriptorSetSlots List<string>

A list of Descriptor Set slot names to be processed. This usually comes from the resource groups (rgroups) in the Effects / Shaders, plus a "Globals" slot for those Descriptor Set layouts that have no specified a slot / group name.

defaultSetSlot string

The default Descriptor Set slot name used for the Graphics Resources in this Effect / Shader when no slot name is specified. Usually, this is "Globals".

Returns

EffectDescriptorSetReflection

The new instance of EffectDescriptorSetReflection containing the Descriptor Set layouts and default set slot information.