Fix an assert.

This commit is contained in:
vlj 2014-05-09 19:32:52 +02:00
parent b4e9a00574
commit cd6e7f3d90

View File

@ -610,15 +610,16 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode)
float up = box.MaxEdge.Y;
float down = box.MinEdge.Y;
core::matrix4 tmp_matrix;
// Prevent Matrix without extend
if (left == right || up == down)
{
Log::error("Shadows", "Shadows Near/Far plane have a 0 area");
sun_ortho_matrix.push_back(tmp_matrix);
continue;
}
core::matrix4 tmp_matrix;
tmp_matrix.buildProjectionMatrixOrthoLH(left, right,
up, down,
30, z);