Represents a shadow mapping cascade.
sealed class
|
ShadowCascade
|
See also:
ShadowMappingThe Batching object that holds the batches for rendering the terrain shadow casters into the shadowmap.
public
property
|
Casters
{
get
}
|
||
type
|
IBatchRenderer<SectorBatch, SectorBatch>
|
||
value
|
|
The render batches for the shadowmap. |
Remarks:
Mesh sectors outside of the light frustum have been culled away. The remaining mesh sectors have been marked explicitly.
See also:
ShadowMapping.ComputeIs this shadow cascade empty?
public
property
|
IsEmpty
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
shadow
cascade
is
empty,
false
if
not. |
The clipped box soup that represents the bounds of all shadow receivers.
public
property
|
Receivers
{
get
}
|
||
type
|
BoxSoup
|
||
value
|
The shadow receiver bounds. |
See also:
ShadowMapping.ComputeThe fitted frustum in terrain-space that contains all shadow receivers and casters.
public
property
|
ShadowFrustum
{
get
}
|
||
type
|
HullFrustum
|
||
value
|
|
The shadow frustum (will always be the same object). |
Remarks:
The
plane
at
index
0
(see
PlaneAt)
is
perpendicular
to
the
light
direction
and
represent
the
far
clipping
plane.
The
other
planes
are
parallel
to
the
light
direction
vector
and
form
a
convex
hull.
An object is a potential shadow caster if it intersects with the shadow frustum.
See also:
ShadowMatrixReturns a vector shape that represents the convex hull of all shadow receivers and casters in shadowmap-space (see ShadowMatrix).
public
property
|
ShadowHull
{
get
}
|
||
type
|
IShape
|
||
value
|
The
hull
shape
or
null
if
empty. |
Remarks:
The convex hull is not needed for shadow-mapping, but it is useful for visual debugging.
See also:
ShadowMapping.ComputeThe shadow matrix that transforms terrain-space to shadowmap-space.
public
property
|
ShadowMatrix
{
get
}
|
||
type
|
Mat4D
|
||
value
|
The transformation matrix from terrain-space to shadowmap-space. |
Remarks:
The shadowmap-space is defined as follows:
X := texture U-axis, [0..1] => left to right Y := texture V-axis, [0..1] => top to bottom Z := texture sample value, from 0 (near) to 1 (far)
See also:
ShadowFrustumThe shadow matrix that transforms local terrain-space (i.e. centered at view point, see ViewPoint) to shadowmap-space.
public
property
|
ShadowMatrixLocal
{
get
}
|
||
type
|
Mat4D
|
||
value
|
The transformation matrix from local terrain-space to shadowmap-space. |
Remarks:
The shadowmap-space is defined as follows:
X := texture U-axis, [0..1] => left to right Y := texture V-axis, [0..1] => top to bottom Z := texture sample value, from 0 (near) to 1 (far)
See also:
ShadowMapping.ComputeEnable perspective transformation in shadow matrix?
public
property
|
ShadowMatrixPerspective
{
get
set
}
|
||
type
|
bool
|
||
value
|
true
if
the
shadow
matrix
(see
ShadowMatrix)
shall
be
a
homogeneous
3D
transformation
matrix,
false
if
it
shall
be
an
affine
transformation.
|
Remarks:
Defaults
to
true
.
See also:
ShadowMapping.ComputeThe shadow matrix that transforms local terrain-space (i.e. centered at view point, see ViewPoint) to normalized device coordinates.
public
property
|
ShadowProjection
{
get
}
|
||
type
|
Mat4D
|
||
value
|
The transformation matrix from local terrain-space to normalized device coordinates. |
Remarks:
Normalized device coordinates are defined as follows:
[+1, 0, 0] := right viewport edge [-1, 0, 0] := left viewport edge [0, +1, 0] := top viewport edge [0, -1, 0] := bottom viewport edge [0, 0, +1] := far plane [0, 0, N] := near planewhere
N
is
either
0
or
-1
,
depending
on
the
value
of
NearAtZero.
See also:
ShadowMapping.ComputeThe maximum Z-value before division by W, produced by the shadow projection matrix (see ShadowProjection) when transforming the shadow receivers point soup (see Receivers).
public
property
|
ShadowProjectionMaxZ
{
get
}
|
||
type
|
float64
|
||
value
|
|
The maximum Z-value. |
Remarks:
This value is useful when using a non-linear depth buffer (e.g. a logarithmic one).
See also:
ShadowMapping.ComputeThe Z-coordinate range of this shadow map cascade, in camera-space.
public
property
|
ViewRangeZ
{
get
}
|
||
type
|
RangeD
|
||
value
|
The Z-range, not including the cascade overlap (see CascadeOverlap). |