Click or drag to resize
AB4D logo

VarianceShadowRenderingProviderShadowMapSize Property

Gets or sets and integer value that represents the size of a shadow depth map texture. Default value is 512 and means that by default a 512 x 512 texture will be used.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public int ShadowMapSize { get; set; }

Property Value

Int32
Remarks

ShadowMapSize gets or sets and integer value that represents the size of a shadow depth map texture.

The value defines the width and height of the texture. For example value 512 means that a 512 x 512 texture will be used.

The shadow depth map texture is used to store depth information - distance of a pixel from the light.

Bigger texture will produce more detailed shadows but will be slower to render. Also, to bigger texture will require bigger blur amount to achieve nice shoft edges.

Note  Note
The ShadowMapSize and ShadowDepthBluringSize values must be changed before the VarianceShadowRenderingProvider is initialized. To change the value of those two properties do the following:
1) disable the existing VarianceShadowRenderingProvider with calling InitializeShadowRendering(ShadowRenderingProviderBase) method with null parameter;
2) create a new instance of VarianceShadowRenderingProvider with new values for ShadowMapSize and ShadowDepthBluringSize;
3) Call the InitializeShadowRendering(ShadowRenderingProviderBase) method again an pass the new instance of VarianceShadowRenderingProvider as parameter.

Default value is 512.

See Also