Shadows: Emit an error instead of sending wrong corners.

This commit is contained in:
vlj
2014-05-09 18:41:24 +02:00
parent c5e31c96b1
commit bc2c355cd8

View File

@@ -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,