1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Various changes, fixes and features

This commit is contained in:
Gefüllte Taubenbrust 2024-10-27 21:36:40 +01:00
parent b6c099073f
commit 4b88a32c1c
17 changed files with 409 additions and 261 deletions

View file

@ -727,6 +727,9 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
if (shadow_soft_radius < 1.0f)
shadow_soft_radius = 1.0f;
shaders_header << "#define SOFTSHADOWRADIUS " << shadow_soft_radius << "\n";
if (g_settings->getBool("enable_sun_tint"))
shaders_header << "#define ENABLE_TINTED_SUNLIGHT 1\n";
}
if (g_settings->getBool("enable_bloom")) {
@ -757,6 +760,10 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
shaders_header << "#define VOLUMETRIC_LIGHT 1\n";
}
if (g_settings->getBool("enable_volumetric_depth_attenuation")) {
shaders_header << "#define VOLUMETRIC_DEPTH_ATTENUATION 1\n";
}
shaders_header << "#line 0\n"; // reset the line counter for meaningful diagnostics
std::string common_header = shaders_header.str();