Click or drag to resize
DigitalRuneCascadedShadowComputeSplitDistances Method
Computes the Distances for a CascadedShadow.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Vector4F ComputeSplitDistances(
	float near,
	float maxDistance,
	int numberOfCascades,
	float splitDistribution
)

Parameters

near
Type: SystemSingle
The camera near plane distance.
maxDistance
Type: SystemSingle
The maximum shadow distance.
numberOfCascades
Type: SystemInt32
The number of cascades (2, 3 or 4).
splitDistribution
Type: SystemSingle
The split distribution parameter in the range [0, 1]. If this value is 0, the camera frustum is split using a uniform splitting scheme (the camera frustum is split at regular intervals). If this value is 1, the camera frustum is split using a logarithmic splitting scheme. A value between 0 and 1 can be used to interpolate between uniform and logarithmic splitting.

Return Value

Type: Vector4F
The split distances, which can be assigned to Distances.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionnumberOfCascades is greater than 4. Or, splitDistribution is not in the range [0, 1].
See Also