Shadows: Emit an error instead of sending wrong corners.
This commit is contained in:
@@ -610,6 +610,13 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode)
|
||||
float up = box.MaxEdge.Y;
|
||||
float down = box.MinEdge.Y;
|
||||
|
||||
// Prevent Matrix without extend
|
||||
if (left == right || up == down)
|
||||
{
|
||||
Log::error("Shadows", "Shadows Near/Far plane have a 0 area");
|
||||
continue;
|
||||
}
|
||||
|
||||
core::matrix4 tmp_matrix;
|
||||
|
||||
tmp_matrix.buildProjectionMatrixOrthoLH(left, right,
|
||||
|
||||
Reference in New Issue
Block a user