| CascadedShadowIsCascadeLocked Property |
Gets or sets the flags which determine if a cascade is locked.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public bool[] IsCascadeLocked { get; }
Public ReadOnly Property IsCascadeLocked As Boolean()
Get
public:
property array<bool>^ IsCascadeLocked {
array<bool>^ get ();
}
member IsCascadeLocked : bool[] with get
Property Value
Type:
Boolean
A 4-elements array which determines if a cascade is locked. The default value is { false,
false, false, false }, which means all 4 cascades are updated every time.
Remarks
These flags can be used to control shadow map caching. IsCascadeLocked[i] determines
if the ShadowMapRenderer updates the cascade with index i or if it
reuses the cached shadow map. Per default, all flags are and the
shadow maps of all cascades are updated every frame. If the flag of a cascade is set to
, the shadow map of the cascade is not rendered; the result of the
last frame is used instead. The application can use this flags to determine when cascades
need to be updated. (Note: If a flag is changed, it keeps this value until it is changed
again. The flags are not automatically reset.)
Example usages for shadow map caching:
-
Update distant cascades less often.
-
Do not update a cascade if it does not contain any dynamic objects and if the camera has not
move.
-
Distribute cascade updates over several frames. For example: Update cascade 0 and 1 every
frame. Update cascade 2 in every odd numbered frame. Update cascade 3 in every even numbered
frame.
See Also