Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    ForwardLightingRenderFeature Class

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

    Compute lighting shaders and data.

    System.Object → DisposeBase → ComponentBase → RenderFeature → SubRenderFeature → ForwardLightingRenderFeature
    Derived from ForwardLightingRenderFeature:

    public class ForwardLightingRenderFeature : SubRenderFeature, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
    Name Description
    Fields
    CurrentLights

    Property key to access the current collection of from .

    Properties
    LightRenderers
    ShadowMapRenderer
    Methods
    Collect()
    Destroy()
    Draw(RenderDrawContext, RenderView, RenderViewStage)
    Extract()

    Extract data from entities, should be as fast as possible to not block simulation loop. It should be mostly copies, and the actual processing should be part of Prepare().

    Flush(RenderDrawContext)

    Releases temporary resources and cleans the state. Should be called once after all Draw(RenderDrawContext, RenderView, RenderViewStage) calls have finished.

    InitializeCore()
    OnRenderSystemChanged()
    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).

    Unload()
    | Improve this Doc View Source

    Fields


    CurrentLights

    Property key to access the current collection of from .

    public static readonly PropertyKey<RenderLightCollection> CurrentLights
    Field Value
    Type Description
    PropertyKey<RenderLightCollection>
    | Improve this Doc View Source

    Properties


    LightRenderers

    [DataMember]
    public TrackingCollection<LightGroupRendererBase> LightRenderers { get; }
    Property Value
    Type Description
    TrackingCollection<LightGroupRendererBase>

    ShadowMapRenderer

    [DataMember]
    public IShadowMapRenderer ShadowMapRenderer { get; set; }
    Property Value
    Type Description
    IShadowMapRenderer
    | Improve this Doc View Source

    Methods


    Collect()

    public override void Collect()
    Overrides
    RenderFeature.Collect()

    Destroy()

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

    Draw(RenderDrawContext, RenderView, RenderViewStage)

    public override void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage)
    Parameters
    Type Name Description
    RenderDrawContext context
    RenderView renderView
    RenderViewStage renderViewStage
    Overrides
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage)

    Extract()

    Extract data from entities, should be as fast as possible to not block simulation loop. It should be mostly copies, and the actual processing should be part of Prepare().

    public override void Extract()
    Overrides
    RenderFeature.Extract()

    Flush(RenderDrawContext)

    Releases temporary resources and cleans the state. Should be called once after all Draw(RenderDrawContext, RenderView, RenderViewStage) calls have finished.

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

    InitializeCore()

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

    OnRenderSystemChanged()

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

    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)

    Unload()

    public override void Unload()
    Overrides
    RenderFeature.Unload()

    Inherited Members

    SubRenderFeature.RootRenderFeature
    SubRenderFeature.ProcessPipelineState(RenderContext, RenderNodeReference, RenderNode, RenderObject, PipelineStateDescription)
    RenderFeature.Context
    RenderFeature.RenderSystem
    RenderFeature.Initialized
    RenderFeature.Enabled
    RenderFeature.Initialize(RenderContext)
    RenderFeature.Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)
    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