mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Improve shadow filters (#12195)
* Rewrite shadow filtering for the new distortion * Calculate penumbra radius using a single sample * Avoid peter-panning effect due to filtering of short shadows * Add adaptive filter quality for soft shadows * Avoid sharp shadows on surfaces without normals (e.g. plants) * Increase default and maximum soft shadow radius * Make line numbers in shader errors match the code
This commit is contained in:
@@ -670,6 +670,7 @@ std::string ShadowRenderer::readShaderFile(const std::string &path)
|
||||
std::string prefix;
|
||||
if (m_shadow_map_colored)
|
||||
prefix.append("#define COLORED_SHADOWS 1\n");
|
||||
prefix.append("#line 0\n");
|
||||
|
||||
std::string content;
|
||||
fs::ReadFile(path, content);
|
||||
|
Reference in New Issue
Block a user