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
renderContext
RenderContextshadowGroup
ILightShadowMapShaderGroupData
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
light
RenderLightshadowMapTexture
LightShadowMapTexture
Returns
AddView(int, RenderView, int)
public virtual int AddView(int viewIndex, RenderView renderView, int lightCount)
Parameters
viewIndex
intrenderView
RenderViewlightCount
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
RenderDrawContextviewIndex
intparameters
ParameterCollectionboundingBox
BoundingBoxExt
ApplyViewParameters(RenderDrawContext, int, ParameterCollection)
Applies PerView lighting parameters.
public override void ApplyViewParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters)
Parameters
context
RenderDrawContextviewIndex
intparameters
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
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()