diff options
author | x2048 <codeforsmile@gmail.com> | 2021-07-11 17:15:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-11 08:15:19 -0700 |
commit | f5706d444b02ccc1fcd854968087172d50cfcca2 (patch) | |
tree | 073af762f7981cf49b0be4fdbd203ecc341df811 /src/client/shader.cpp | |
parent | 1d25d1f7ad35f739e8a64c2bdb44105998aed19b (diff) | |
download | minetest-f5706d444b02ccc1fcd854968087172d50cfcca2.tar.gz minetest-f5706d444b02ccc1fcd854968087172d50cfcca2.tar.bz2 minetest-f5706d444b02ccc1fcd854968087172d50cfcca2.zip |
Improve shadow rendering with non-default camera FOV (#11385)
* Adjust minimum filter radius for perspective
* Expand shadow frustum when camera FOV changes, reuse FOV distance adjustment from numeric.cpp
* Read shadow_soft_radius setting as float
* Use adaptive filter radius to accomodate for PSM distortion
* Adjust filter radius for texture resolution
Diffstat (limited to 'src/client/shader.cpp')
-rw-r--r-- | src/client/shader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/shader.cpp b/src/client/shader.cpp index 355366bd3..0b35c37af 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -740,7 +740,7 @@ ShaderInfo ShaderSource::generateShader(const std::string &name, s32 shadow_filter = g_settings->getS32("shadow_filters"); shaders_header << "#define SHADOW_FILTER " << shadow_filter << "\n"; - float shadow_soft_radius = g_settings->getS32("shadow_soft_radius"); + float shadow_soft_radius = g_settings->getFloat("shadow_soft_radius"); if (shadow_soft_radius < 1.0f) shadow_soft_radius = 1.0f; shaders_header << "#define SOFTSHADOWRADIUS " << shadow_soft_radius << "\n"; |