mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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
This commit is contained in:
parent
1d25d1f7ad
commit
f5706d444b
4 changed files with 37 additions and 23 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue