Table of Contents

Class LightShaderGroupDynamic

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

Base class to build light shader groups with LightGroupRendererDynamic.

public abstract class LightShaderGroupDynamic : LightShaderGroup
Inheritance
LightShaderGroupDynamic
Inherited Members

Constructors

LightShaderGroupDynamic(RenderContext, ILightShadowMapShaderGroupData)

protected LightShaderGroupDynamic(RenderContext renderContext, ILightShadowMapShaderGroupData shadowGroup)

Parameters

renderContext RenderContext
shadowGroup ILightShadowMapShaderGroupData

Fields

currentLights

List of lights selected for this rendering.

protected FastListStruct<LightDynamicEntry> currentLights

Field Value

FastListStruct<LightDynamicEntry>

graphicsProfile

protected GraphicsProfile graphicsProfile

Field Value

GraphicsProfile

lightRanges

protected LightShaderGroupDynamic.LightRange[] lightRanges

Field Value

LightRange[]

lights

List of all available lights.

protected FastListStruct<LightDynamicEntry> lights

Field Value

FastListStruct<LightDynamicEntry>

Properties

LightCurrentCount

public int LightCurrentCount { get; }

Property Value

int

LightLastCount

public int LightLastCount { get; }

Property Value

int

ShadowGroup

public ILightShadowMapShaderGroupData ShadowGroup { get; }

Property Value

ILightShadowMapShaderGroupData

Methods

AddLight(RenderLight, LightShadowMapTexture)

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

public bool AddLight(RenderLight light, LightShadowMapTexture shadowMapTexture)

Parameters

light RenderLight
shadowMapTexture LightShadowMapTexture

Returns

bool

AddView(int, RenderView, int)

public virtual int AddView(int viewIndex, RenderView renderView, int lightCount)

Parameters

viewIndex int
renderView RenderView
lightCount int

Returns

int

The number of lights accepted in currentLights.

ApplyDrawParameters(RenderDrawContext, int, ParameterCollection, ref BoundingBoxExt)

Applies PerDraw lighting parameters.

public override void ApplyDrawParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters, ref BoundingBoxExt boundingBox)

Parameters

context RenderDrawContext
viewIndex int
parameters ParameterCollection
boundingBox BoundingBoxExt

ApplyViewParameters(RenderDrawContext, int, ParameterCollection)

Applies PerView lighting parameters.

public override void ApplyViewParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters)

Parameters

context RenderDrawContext
viewIndex int
parameters ParameterCollection

ComputeLightCount(int)

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

lightCount int

Returns

int

Reset()

Resets states.

public override void Reset()

SetViews(FastList<RenderView>)

public virtual void SetViews(FastList<RenderView> views)

Parameters

views FastList<RenderView>

UpdateLayout(string)

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

public override void UpdateLayout(string compositionName)

Parameters

compositionName string

UpdateLightCount()

protected virtual void UpdateLightCount()