LightShaderGroupDynamic Class
Namespace: Stride.Rendering.LightsAssembly: Stride.Rendering.dll
Base class to build light shader groups with LightGroupRendererDynamic.
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() | ||
Constructors
LightShaderGroupDynamic(RenderContext, ILightShadowMapShaderGroupData)
protected LightShaderGroupDynamic(RenderContext renderContext, ILightShadowMapShaderGroupData shadowGroup)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderContext | renderContext | |
| ILightShadowMapShaderGroupData | shadowGroup |
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> |
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 |
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
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
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
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
UpdateLightCount()
protected virtual void UpdateLightCount()