I have a concern with the PSSM shadows, and it's referring to two commands I find in Xors3D.
void xLightShadowEpsilons ( Light * light,
float epsilon1,
float epsilon2
)
Sets epsilon values of light source.
Every light sources has 2 epsilon values for shadows rendering.
First value is a depth bias (it's needed to compensate inaccuracy of floating-point values),
second value is to prevent shadowing of angularly triangles. Epsilons delete some noise from shadows,
but can lead to incorrect rejection of a part of shadow. Default values are optimal, but you may
need to adjust them for best results.
Parameters:
light Light source handle
epsilon1 First epsilon value (compensates inaccuracy of floating-point values)
epsilon2 Second epsilon value (prevents shadowing of angularly triangles),
actually it is a cosine of maximum angle of shadowed triangle.
void xSetShadowParams ( int splitPlanes = 4,
float splitLambda = 0.95f,
bool useOrtho = true,
float lightDist = 300.0f
)
Sets parameters of the shadow system.
You can change number of PSSM split planes (PSSM technique splits visible scene in some parts,
each part will be rendered separately to its own shadow map. It increases quality of shadows near camera,
but may cause loss of quality in large distance from camera), and split lambda. We set optimal values,
but you may change them for better quality or better perfomance.
Also you can change projection type for shadow map rendering, and set the distance of light source from the
camera view point (larger distance causes larger part of scene which casts
shadows, but quality of the shadows is poorer).
Parameters:
splitPlanes Number of split planes for PSSM rendering. The number of split planes
is equal to the number of shadow maps for the directional light.
splitLambda The ratio of the scene splitting in range (0.0; 1.0).
useOrtho True to use orthographical projection, false - for perspective projection.
lightDist Distance from light source to the view point.
 Someone can help me understand these parameters and find the right ones. Because my settings always have strange effects.
|