Created
April 2, 2022 07:54
-
-
Save x2048/0ec1912f03a2c13553d8513e357a0091 to your computer and use it in GitHub Desktop.
Increase shadow range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/client/shadows/dynamicshadows.cpp b/src/client/shadows/dynamicshadows.cpp | |
index 2995ec205..ddec3a5d5 100644 | |
--- a/src/client/shadows/dynamicshadows.cpp | |
+++ b/src/client/shadows/dynamicshadows.cpp | |
@@ -94,7 +94,7 @@ void DirectionalLight::update_frustum(const Camera *cam, Client *client, bool fo | |
float zNear = cam->getCameraNode()->getNearValue(); | |
float zFar = getMaxFarValue(); | |
if (!client->getEnv().getClientMap().getControl().range_all) | |
- zFar = MYMIN(zFar, client->getEnv().getClientMap().getControl().wanted_range * BS); | |
+ zFar = MYMIN(zFar, client->getEnv().getClientMap().getControl().wanted_range * BS * 1.5); | |
/////////////////////////////////// | |
// update splits near and fars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment