Add shadow scale parameters
This commit is contained in:
parent
b288d9c8c4
commit
b7fc539f57
@ -378,6 +378,7 @@ private:
|
||||
class STKMeshSceneNode *m_sun_interposer;
|
||||
scene::CLensFlareSceneNode *m_lensflare;
|
||||
scene::ICameraSceneNode *m_suncam;
|
||||
std::pair<float, float> m_shadow_scales[4];
|
||||
scene::ICameraSceneNode *m_shadow_camnodes[4];
|
||||
float m_shadows_cam[4][24];
|
||||
|
||||
|
@ -904,10 +904,13 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
|
||||
|
||||
// Prevent Matrix without extend
|
||||
if (left != right && up != down)
|
||||
{
|
||||
tmp_matrix.buildProjectionMatrixOrthoLH(left, right,
|
||||
down, up,
|
||||
float(CBB[currentCBB][i].zmin / 4 - 100),
|
||||
float(CBB[currentCBB][i].zmax / 4 + 2) );
|
||||
down, up,
|
||||
float(CBB[currentCBB][i].zmin / 4 - 100),
|
||||
float(CBB[currentCBB][i].zmax / 4 + 2));
|
||||
m_shadow_scales[i] = std::make_pair(right - left, down - up);
|
||||
}
|
||||
}
|
||||
else
|
||||
tmp_matrix = getTighestFitOrthoProj(SunCamViewMatrix, vectors);
|
||||
|
Loading…
Reference in New Issue
Block a user