Class LightShaderGroupDynamic
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
renderContextRenderContextshadowGroupILightShadowMapShaderGroupData
Fields
currentLights
List of lights selected for this rendering.
protected FastListStruct<LightDynamicEntry> currentLights
Field Value
graphicsProfile
protected GraphicsProfile graphicsProfile
Field Value
lightRanges
protected LightShaderGroupDynamic.LightRange[] lightRanges
Field Value
lights
List of all available lights.
protected FastListStruct<LightDynamicEntry> lights
Field Value
Properties
LightCurrentCount
public int LightCurrentCount { get; }
Property Value
LightLastCount
public int LightLastCount { get; }
Property Value
ShadowGroup
public ILightShadowMapShaderGroupData ShadowGroup { get; }
Property Value
Methods
AddLight(RenderLight, LightShadowMapTexture)
Try to add light to this group (returns false if not possible).
public bool AddLight(RenderLight light, LightShadowMapTexture shadowMapTexture)
Parameters
lightRenderLightshadowMapTextureLightShadowMapTexture
Returns
AddView(int, RenderView, int)
public virtual int AddView(int viewIndex, RenderView renderView, int lightCount)
Parameters
viewIndexintrenderViewRenderViewlightCountint
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
contextRenderDrawContextviewIndexintparametersParameterCollectionboundingBoxBoundingBoxExt
ApplyViewParameters(RenderDrawContext, int, ParameterCollection)
Applies PerView lighting parameters.
public override void ApplyViewParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters)
Parameters
contextRenderDrawContextviewIndexintparametersParameterCollection
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
lightCountint
Returns
Reset()
Resets states.
public override void Reset()
SetViews(FastList<RenderView>)
public virtual void SetViews(FastList<RenderView> views)
Parameters
viewsFastList<RenderView>
UpdateLayout(string)
Called when layout is updated, so that parameter keys can be recomputed.
public override void UpdateLayout(string compositionName)
Parameters
compositionNamestring
UpdateLightCount()
protected virtual void UpdateLightCount()