mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 07:03:36 -04:00
rplight: Fix PSSM calculation failing with infinite far distance
Fixes #1397
This commit is contained in:
parent
37795cd596
commit
5db4b447a6
@ -400,7 +400,8 @@ void PSSMCameraRig::update(NodePath cam_node, const LVecBase3 &light_vector) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do the actual PSSM
|
// Do the actual PSSM
|
||||||
compute_pssm_splits( transform, _pssm_distance / lens->get_far(), light_vector );
|
double far_recip = std::max(1.0 / (double)lens->get_far(), (double)lens_far_limit);
|
||||||
|
compute_pssm_splits( transform, _pssm_distance * far_recip, light_vector );
|
||||||
|
|
||||||
_update_collector.stop();
|
_update_collector.stop();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user