mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Limit shadow map to the viewing range (#12158)
This commit is contained in:
parent
31578303a4
commit
3dd7d7867b
@ -93,6 +93,8 @@ void DirectionalLight::update_frustum(const Camera *cam, Client *client, bool fo
|
|||||||
|
|
||||||
float zNear = cam->getCameraNode()->getNearValue();
|
float zNear = cam->getCameraNode()->getNearValue();
|
||||||
float zFar = getMaxFarValue();
|
float zFar = getMaxFarValue();
|
||||||
|
if (!client->getEnv().getClientMap().getControl().range_all)
|
||||||
|
zFar = MYMIN(zFar, client->getEnv().getClientMap().getControl().wanted_range * BS);
|
||||||
|
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
// update splits near and fars
|
// update splits near and fars
|
||||||
|
Loading…
Reference in New Issue
Block a user