Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RootEffectRenderFeature Class

    Namespace: Stride.Rendering
    Assembly: Stride.Rendering.dll

    A root render feature that can manipulate effects.

    System.Object → DisposeBase → ComponentBase → RenderFeature → RootRenderFeature → RootEffectRenderFeature
    Derived from RootEffectRenderFeature: ParticleEmitterRenderFeature MeshRenderFeature

    public abstract class RootEffectRenderFeature : RootRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
    Name Description
    Fields
    EffectCompiled
    InstantiatedEffects

    Stores reflection info for each effect.

    RenderEffectKey

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

    ResourceGroupPool
    Properties
    ComputeFallbackEffect
    EffectDescriptorSetSlotCount
    EffectObjectNodes
    EffectPermutationSlotCount

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

    FrameLayouts
    PipelineProcessors
    Methods
    ComputeDataArrayExpectedSize(DataType)
    ComputeResourceGroupOffset(RenderNodeReference)

    Compute the index of first descriptor set stored in ResourceGroupPool.

    CreateDrawCBufferOffsetSlot(String)
    CreateDrawLogicalGroup(String)
    CreateEffectPermutationSlot(String)

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

    CreateFrameCBufferOffsetSlot(String)
    CreateUniqueDescriptorSetLayout(DescriptorSetLayoutBuilder)
    CreateViewCBufferOffsetSlot(String)
    CreateViewLogicalGroup(String)
    Destroy()
    GetEffectPermutationSlot(RenderStage)

    Gets the effect slot for a given render stage.

    GetOrCreateEffectDescriptorSetSlot(String)
    InitializeCore()

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

    InvalidateEffectPermutation(RenderObject, RenderEffect)

    Implemented by subclasses to reset effect dependent data.

    Prepare(RenderDrawContext)

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

    PrepareEffectPermutations(RenderDrawContext)

    Perform effect permutations, before Prepare(RenderDrawContext).

    PrepareEffectPermutationsImpl(RenderDrawContext)

    Actual implementation of PrepareEffectPermutations(RenderDrawContext).

    ProcessPipelineState(RenderContext, RenderNodeReference, ref RenderNode, RenderObject, PipelineStateDescription)
    RemoveViewCBufferOffsetSlot(ConstantBufferOffsetReference)
    Reset()
    | Improve this Doc View Source

    Fields


    EffectCompiled

    public Action<RenderSystem, Effect, RenderEffectReflection> EffectCompiled
    Field Value
    Type Description
    System.Action<RenderSystem, Effect, RenderEffectReflection>

    InstantiatedEffects

    Stores reflection info for each effect.

    public Dictionary<Effect, RenderEffectReflection> InstantiatedEffects
    Field Value
    Type Description
    System.Collections.Generic.Dictionary<Effect, RenderEffectReflection>

    RenderEffectKey

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

    public StaticObjectPropertyKey<RenderEffect> RenderEffectKey
    Field Value
    Type Description
    StaticObjectPropertyKey<RenderEffect>

    ResourceGroupPool

    public ResourceGroup[] ResourceGroupPool
    Field Value
    Type Description
    ResourceGroup[]
    | Improve this Doc View Source

    Properties


    ComputeFallbackEffect

    public RootEffectRenderFeature.ComputeFallbackEffectDelegate ComputeFallbackEffect { get; set; }
    Property Value
    Type Description
    RootEffectRenderFeature.ComputeFallbackEffectDelegate

    EffectDescriptorSetSlotCount

    public int EffectDescriptorSetSlotCount { get; }
    Property Value
    Type Description
    System.Int32

    EffectObjectNodes

    public ConcurrentCollector<EffectObjectNode> EffectObjectNodes { get; }
    Property Value
    Type Description
    ConcurrentCollector<EffectObjectNode>

    EffectPermutationSlotCount

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

    public int EffectPermutationSlotCount { get; }
    Property Value
    Type Description
    System.Int32

    FrameLayouts

    public ConcurrentCollector<FrameResourceGroupLayout> FrameLayouts { get; }
    Property Value
    Type Description
    ConcurrentCollector<FrameResourceGroupLayout>

    PipelineProcessors

    [DataMember]
    public List<PipelineProcessor> PipelineProcessors { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<PipelineProcessor>
    | Improve this Doc View Source

    Methods


    ComputeDataArrayExpectedSize(DataType)

    protected override int ComputeDataArrayExpectedSize(DataType type)
    Parameters
    Type Name Description
    DataType type
    Returns
    Type Description
    System.Int32
    Overrides
    RootRenderFeature.ComputeDataArrayExpectedSize(DataType)

    ComputeResourceGroupOffset(RenderNodeReference)

    Compute the index of first descriptor set stored in ResourceGroupPool.

    protected int ComputeResourceGroupOffset(RenderNodeReference renderNode)
    Parameters
    Type Name Description
    RenderNodeReference renderNode
    Returns
    Type Description
    System.Int32

    CreateDrawCBufferOffsetSlot(String)

    public ConstantBufferOffsetReference CreateDrawCBufferOffsetSlot(string variable)
    Parameters
    Type Name Description
    System.String variable
    Returns
    Type Description
    ConstantBufferOffsetReference

    CreateDrawLogicalGroup(String)

    public LogicalGroupReference CreateDrawLogicalGroup(string logicalGroup)
    Parameters
    Type Name Description
    System.String logicalGroup
    Returns
    Type Description
    LogicalGroupReference

    CreateEffectPermutationSlot(String)

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

    public EffectPermutationSlot CreateEffectPermutationSlot(string effectName)
    Parameters
    Type Name Description
    System.String effectName
    Returns
    Type Description
    EffectPermutationSlot

    CreateFrameCBufferOffsetSlot(String)

    public ConstantBufferOffsetReference CreateFrameCBufferOffsetSlot(string variable)
    Parameters
    Type Name Description
    System.String variable
    Returns
    Type Description
    ConstantBufferOffsetReference

    CreateUniqueDescriptorSetLayout(DescriptorSetLayoutBuilder)

    public DescriptorSetLayout CreateUniqueDescriptorSetLayout(DescriptorSetLayoutBuilder descriptorSetLayoutBuilder)
    Parameters
    Type Name Description
    DescriptorSetLayoutBuilder descriptorSetLayoutBuilder
    Returns
    Type Description
    DescriptorSetLayout

    CreateViewCBufferOffsetSlot(String)

    public ConstantBufferOffsetReference CreateViewCBufferOffsetSlot(string variable)
    Parameters
    Type Name Description
    System.String variable
    Returns
    Type Description
    ConstantBufferOffsetReference

    CreateViewLogicalGroup(String)

    public LogicalGroupReference CreateViewLogicalGroup(string logicalGroup)
    Parameters
    Type Name Description
    System.String logicalGroup
    Returns
    Type Description
    LogicalGroupReference

    Destroy()

    protected override void Destroy()
    Overrides
    RenderFeature.Destroy()

    GetEffectPermutationSlot(RenderStage)

    Gets the effect slot for a given render stage.

    public EffectPermutationSlot GetEffectPermutationSlot(RenderStage renderStage)
    Parameters
    Type Name Description
    RenderStage renderStage
    Returns
    Type Description
    EffectPermutationSlot

    GetOrCreateEffectDescriptorSetSlot(String)

    public EffectDescriptorSetReference GetOrCreateEffectDescriptorSetSlot(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    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()
    Overrides
    RenderFeature.InitializeCore()

    InvalidateEffectPermutation(RenderObject, RenderEffect)

    Implemented by subclasses to reset effect dependent data.

    protected virtual void InvalidateEffectPermutation(RenderObject renderObject, RenderEffect renderEffect)
    Parameters
    Type Name Description
    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
    Type Name Description
    RenderDrawContext context
    Overrides
    RenderFeature.Prepare(RenderDrawContext)

    PrepareEffectPermutations(RenderDrawContext)

    Perform effect permutations, before Prepare(RenderDrawContext).

    public override void PrepareEffectPermutations(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context
    Overrides
    RenderFeature.PrepareEffectPermutations(RenderDrawContext)

    PrepareEffectPermutationsImpl(RenderDrawContext)

    Actual implementation of PrepareEffectPermutations(RenderDrawContext).

    public virtual void PrepareEffectPermutationsImpl(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

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

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

    RemoveViewCBufferOffsetSlot(ConstantBufferOffsetReference)

    public void RemoveViewCBufferOffsetSlot(ConstantBufferOffsetReference cbufferOffsetSlot)
    Parameters
    Type Name Description
    ConstantBufferOffsetReference cbufferOffsetSlot

    Reset()

    public override void Reset()
    Overrides
    RootRenderFeature.Reset()

    Inherited Members

    RootRenderFeature.RenderData
    RootRenderFeature.Index
    RootRenderFeature.SortKey
    RootRenderFeature.RenderObjects
    RootRenderFeature.ObjectNodeReferences
    RootRenderFeature.RenderNodes
    RootRenderFeature.RenderStageSelectors
    RootRenderFeature.SupportedRenderObjectType
    RootRenderFeature.Unload()
    RootRenderFeature.GetRenderNode(RenderNodeReference)
    RootRenderFeature.GetViewObjectNode(ViewObjectNodeReference)
    RootRenderFeature.GetObjectNode(ObjectNodeReference)
    RootRenderFeature.CreateViewObjectNode(RenderView, RenderObject)
    RootRenderFeature.OnAddRenderObject(RenderObject)
    RootRenderFeature.OnRemoveRenderObject(RenderObject)
    RootRenderFeature.PrepareDataArrays()
    RenderFeature.Context
    RenderFeature.RenderSystem
    RenderFeature.Initialized
    RenderFeature.Enabled
    RenderFeature.Initialize(RenderContext)
    RenderFeature.Collect()
    RenderFeature.Extract()
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage)
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)
    RenderFeature.Flush(RenderDrawContext)
    RenderFeature.OnRenderSystemChanged()
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation