Table of Contents

Class RootEffectRenderFeature

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

A root render feature that can manipulate effects.

public abstract class RootEffectRenderFeature : RootRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
Inheritance
RootEffectRenderFeature
Implements
Derived
Inherited Members
Extension Methods

Fields

EffectCompiled

public Action<RenderSystem, Effect, RenderEffectReflection> EffectCompiled

Field Value

Action<RenderSystem, Effect, RenderEffectReflection>

InstantiatedEffects

Stores reflection info for each effect.

public Dictionary<Effect, RenderEffectReflection> InstantiatedEffects

Field Value

Dictionary<Effect, RenderEffectReflection>

RenderEffectKey

Key to store extra info for each effect instantiation of each object.

public StaticObjectPropertyKey<RenderEffect> RenderEffectKey

Field Value

StaticObjectPropertyKey<RenderEffect>

ResourceGroupPool

public ResourceGroup[] ResourceGroupPool

Field Value

ResourceGroup[]

Properties

ComputeFallbackEffect

public RootEffectRenderFeature.ComputeFallbackEffectDelegate ComputeFallbackEffect { get; set; }

Property Value

RootEffectRenderFeature.ComputeFallbackEffectDelegate

EffectDescriptorSetSlotCount

public int EffectDescriptorSetSlotCount { get; }

Property Value

int

EffectObjectNodes

public ConcurrentCollector<EffectObjectNode> EffectObjectNodes { get; }

Property Value

ConcurrentCollector<EffectObjectNode>

EffectPermutationSlotCount

Gets number of effect permutation slot, which is the number of effect cached per object.

public int EffectPermutationSlotCount { get; }

Property Value

int

FrameLayouts

public ConcurrentCollector<FrameResourceGroupLayout> FrameLayouts { get; }

Property Value

ConcurrentCollector<FrameResourceGroupLayout>

PipelineProcessors

[DataMember]
public List<PipelineProcessor> PipelineProcessors { get; }

Property Value

List<PipelineProcessor>

Methods

ComputeDataArrayExpectedSize(DataType)

protected override int ComputeDataArrayExpectedSize(DataType type)

Parameters

type DataType

Returns

int

ComputeResourceGroupOffset(RenderNodeReference)

Compute the index of first descriptor set stored in ResourceGroupPool.

protected int ComputeResourceGroupOffset(RenderNodeReference renderNode)

Parameters

renderNode RenderNodeReference

Returns

int

CreateDrawCBufferOffsetSlot(string)

public ConstantBufferOffsetReference CreateDrawCBufferOffsetSlot(string variable)

Parameters

variable string

Returns

ConstantBufferOffsetReference

CreateDrawLogicalGroup(string)

public LogicalGroupReference CreateDrawLogicalGroup(string logicalGroup)

Parameters

logicalGroup string

Returns

LogicalGroupReference

CreateEffectPermutationSlot(string)

Creates a slot for storing a particular effect instantiation (per RenderObject).

public EffectPermutationSlot CreateEffectPermutationSlot(string effectName)

Parameters

effectName string

Returns

EffectPermutationSlot

CreateFrameCBufferOffsetSlot(string)

public ConstantBufferOffsetReference CreateFrameCBufferOffsetSlot(string variable)

Parameters

variable string

Returns

ConstantBufferOffsetReference

CreateUniqueDescriptorSetLayout(DescriptorSetLayoutBuilder)

public DescriptorSetLayout CreateUniqueDescriptorSetLayout(DescriptorSetLayoutBuilder descriptorSetLayoutBuilder)

Parameters

descriptorSetLayoutBuilder DescriptorSetLayoutBuilder

Returns

DescriptorSetLayout

CreateViewCBufferOffsetSlot(string)

public ConstantBufferOffsetReference CreateViewCBufferOffsetSlot(string variable)

Parameters

variable string

Returns

ConstantBufferOffsetReference

CreateViewLogicalGroup(string)

public LogicalGroupReference CreateViewLogicalGroup(string logicalGroup)

Parameters

logicalGroup string

Returns

LogicalGroupReference

Destroy()

Disposes of object resources.

protected override void Destroy()

GetEffectPermutationSlot(RenderStage)

Gets the effect slot for a given render stage.

public EffectPermutationSlot GetEffectPermutationSlot(RenderStage renderStage)

Parameters

renderStage RenderStage

Returns

EffectPermutationSlot

GetOrCreateEffectDescriptorSetSlot(string)

public EffectDescriptorSetReference GetOrCreateEffectDescriptorSetSlot(string name)

Parameters

name string

Returns

EffectDescriptorSetReference

InitializeCore()

Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning)

protected override void InitializeCore()

InvalidateEffectPermutation(RenderObject, RenderEffect)

Implemented by subclasses to reset effect dependent data.

protected virtual void InvalidateEffectPermutation(RenderObject renderObject, RenderEffect renderEffect)

Parameters

renderObject RenderObject
renderEffect RenderEffect

Prepare(RenderDrawContext)

Performs most of the work (computation and resource preparation). Later game simulation might be running during that step.

public override void Prepare(RenderDrawContext context)

Parameters

context RenderDrawContext

PrepareEffectPermutations(RenderDrawContext)

Perform effect permutations, before Prepare(RenderDrawContext).

public override void PrepareEffectPermutations(RenderDrawContext context)

Parameters

context RenderDrawContext

PrepareEffectPermutationsImpl(RenderDrawContext)

public virtual void PrepareEffectPermutationsImpl(RenderDrawContext context)

Parameters

context RenderDrawContext

ProcessPipelineState(RenderContext, RenderNodeReference, ref RenderNode, RenderObject, PipelineStateDescription)

protected virtual void ProcessPipelineState(RenderContext context, RenderNodeReference renderNodeReference, ref RenderNode renderNode, RenderObject renderObject, PipelineStateDescription pipelineState)

Parameters

context RenderContext
renderNodeReference RenderNodeReference
renderNode RenderNode
renderObject RenderObject
pipelineState PipelineStateDescription

RemoveViewCBufferOffsetSlot(ConstantBufferOffsetReference)

public void RemoveViewCBufferOffsetSlot(ConstantBufferOffsetReference cbufferOffsetSlot)

Parameters

cbufferOffsetSlot ConstantBufferOffsetReference

Reset()

public override void Reset()