Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    LightShaderGroupDynamic Class

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

    Base class to build light shader groups with LightGroupRendererDynamic.

    System.Object → LightShaderGroup → LightShaderGroupDynamic
    Derived from LightShaderGroupDynamic:

    public abstract class LightShaderGroupDynamic : LightShaderGroup
    Name Description
    Constructors
    LightShaderGroupDynamic(RenderContext, ILightShadowMapShaderGroupData)
    Fields
    currentLights

    List of lights selected for this rendering.

    graphicsProfile
    lightRanges
    lights

    List of all available lights.

    Properties
    LightCurrentCount
    LightLastCount
    ShadowGroup
    Methods
    AddLight(RenderLight, LightShadowMapTexture)

    Try to add light to this group (returns false if not possible).

    AddView(Int32, RenderView, Int32)
    ApplyDrawParameters(RenderDrawContext, Int32, ParameterCollection, ref BoundingBoxExt)

    Applies PerDraw lighting parameters.

    ApplyViewParameters(RenderDrawContext, Int32, ParameterCollection)

    Applies PerView lighting parameters.

    ComputeLightCount(Int32)

    Compute the number of light supported by this shader. Usually a different number of light will trigger a permutation and layout update.

    Reset()

    Resets states.

    SetViews(FastList<RenderView>)
    UpdateLayout(String)

    Called when layout is updated, so that parameter keys can be recomputed.

    UpdateLightCount()
    | Improve this Doc View Source

    Constructors


    LightShaderGroupDynamic(RenderContext, ILightShadowMapShaderGroupData)

    protected LightShaderGroupDynamic(RenderContext renderContext, ILightShadowMapShaderGroupData shadowGroup)
    Parameters
    Type Name Description
    RenderContext renderContext
    ILightShadowMapShaderGroupData shadowGroup
    | Improve this Doc View Source

    Fields


    currentLights

    List of lights selected for this rendering.

    protected FastListStruct<LightDynamicEntry> currentLights
    Field Value
    Type Description
    FastListStruct<LightDynamicEntry>

    graphicsProfile

    protected GraphicsProfile graphicsProfile
    Field Value
    Type Description
    GraphicsProfile

    lightRanges

    protected LightShaderGroupDynamic.LightRange[] lightRanges
    Field Value
    Type Description
    LightShaderGroupDynamic.LightRange[]

    lights

    List of all available lights.

    protected FastListStruct<LightDynamicEntry> lights
    Field Value
    Type Description
    FastListStruct<LightDynamicEntry>
    | Improve this Doc View Source

    Properties


    LightCurrentCount

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

    LightLastCount

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

    ShadowGroup

    public ILightShadowMapShaderGroupData ShadowGroup { get; }
    Property Value
    Type Description
    ILightShadowMapShaderGroupData
    | Improve this Doc View Source

    Methods


    AddLight(RenderLight, LightShadowMapTexture)

    Try to add light to this group (returns false if not possible).

    public bool AddLight(RenderLight light, LightShadowMapTexture shadowMapTexture)
    Parameters
    Type Name Description
    RenderLight light
    LightShadowMapTexture shadowMapTexture
    Returns
    Type Description
    System.Boolean

    AddView(Int32, RenderView, Int32)

    public virtual int AddView(int viewIndex, RenderView renderView, int lightCount)
    Parameters
    Type Name Description
    System.Int32 viewIndex
    RenderView renderView
    System.Int32 lightCount
    Returns
    Type Description
    System.Int32

    The number of lights accepted in currentLights.


    ApplyDrawParameters(RenderDrawContext, Int32, ParameterCollection, ref BoundingBoxExt)

    Applies PerDraw lighting parameters.

    public override void ApplyDrawParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters, ref BoundingBoxExt boundingBox)
    Parameters
    Type Name Description
    RenderDrawContext context
    System.Int32 viewIndex
    ParameterCollection parameters
    BoundingBoxExt boundingBox
    Overrides
    LightShaderGroup.ApplyDrawParameters(RenderDrawContext, Int32, ParameterCollection, ref BoundingBoxExt)

    ApplyViewParameters(RenderDrawContext, Int32, ParameterCollection)

    Applies PerView lighting parameters.

    public override void ApplyViewParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters)
    Parameters
    Type Name Description
    RenderDrawContext context
    System.Int32 viewIndex
    ParameterCollection parameters
    Overrides
    LightShaderGroup.ApplyViewParameters(RenderDrawContext, Int32, ParameterCollection)

    ComputeLightCount(Int32)

    Compute the number of light supported by this shader. Usually a different number of light will trigger a permutation and layout update.

    protected virtual int ComputeLightCount(int lightCount)
    Parameters
    Type Name Description
    System.Int32 lightCount
    Returns
    Type Description
    System.Int32

    Reset()

    Resets states.

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

    SetViews(FastList<RenderView>)

    public virtual void SetViews(FastList<RenderView> views)
    Parameters
    Type Name Description
    FastList<RenderView> views

    UpdateLayout(String)

    Called when layout is updated, so that parameter keys can be recomputed.

    public override void UpdateLayout(string compositionName)
    Parameters
    Type Name Description
    System.String compositionName
    Overrides
    LightShaderGroup.UpdateLayout(String)

    UpdateLightCount()

    protected virtual void UpdateLightCount()

    Inherited Members

    LightShaderGroup.ShaderSource
    LightShaderGroup.HasEffectPermutations
    LightShaderGroup.ApplyEffectPermutations(RenderEffect)
    LightShaderGroup.UpdateViewResources(RenderDrawContext, Int32)

    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