Table of Contents

Class LightShadowMapRendererBase

Namespace
Stride.Rendering.Shadows
Assembly
Stride.Rendering.dll

Base class for shadow map renderers

[DataContract(Inherited = true, DefaultMemberMode = DataMemberMode.Never)]
public abstract class LightShadowMapRendererBase : ILightShadowMapRenderer, ILightShadowRenderer
Inheritance
LightShadowMapRendererBase
Implements
Derived

Constructors

LightShadowMapRendererBase()

protected LightShadowMapRendererBase()

Fields

shadowMaps

protected PoolListStruct<LightShadowMapTexture> shadowMaps

Field Value

PoolListStruct<LightShadowMapTexture>

shadowRenderViews

protected PoolListStruct<ShadowMapRenderView> shadowRenderViews

Field Value

PoolListStruct<ShadowMapRenderView>

Properties

ShadowCasterRenderStage

The shadow map render stage this light shadow map renderer uses

[DataMember]
public RenderStage ShadowCasterRenderStage { get; set; }

Property Value

RenderStage

Methods

ApplyViewParameters(RenderDrawContext, ParameterCollection, LightShadowMapTexture)

public virtual void ApplyViewParameters(RenderDrawContext context, ParameterCollection parameters, LightShadowMapTexture shadowMapTexture)

Parameters

context RenderDrawContext
parameters ParameterCollection
shadowMapTexture LightShadowMapTexture

CanRenderLight(IDirectLight)

Test if this renderer can render this kind of light

public abstract bool CanRenderLight(IDirectLight light)

Parameters

light IDirectLight

Returns

bool

Collect(RenderContext, RenderView, LightShadowMapTexture)

public abstract void Collect(RenderContext context, RenderView sourceView, LightShadowMapTexture lightShadowMap)

Parameters

context RenderContext
sourceView RenderView
lightShadowMap LightShadowMapTexture

CreateRenderView()

Creates a default view with the shadow caster stage added to it

public virtual ShadowMapRenderView CreateRenderView()

Returns

ShadowMapRenderView

CreateShaderGroupData(LightShadowType)

public abstract ILightShadowMapShaderGroupData CreateShaderGroupData(LightShadowType shadowType)

Parameters

shadowType LightShadowType

Returns

ILightShadowMapShaderGroupData

CreateShadowMapTexture(RenderView, RenderLight, IDirectLight, int)

public virtual LightShadowMapTexture CreateShadowMapTexture(RenderView renderView, RenderLight renderLight, IDirectLight light, int shadowMapSize)

Parameters

renderView RenderView
renderLight RenderLight
light IDirectLight
shadowMapSize int

Returns

LightShadowMapTexture

GetShadowType(LightShadowMap)

public virtual LightShadowType GetShadowType(LightShadowMap shadowMap)

Parameters

shadowMap LightShadowMap

Returns

LightShadowType

Reset(RenderContext)

Reset the state of this instance before calling Render method multiple times for different shadow map textures. See remarks.

public virtual void Reset(RenderContext context)

Parameters

context RenderContext

Remarks

This method allows the implementation to prepare some internal states before being rendered.