Enable negative values for sun/moon orbit tilt (Northern hemisphere) (#12904)

This commit is contained in:
x2048 2022-10-30 16:54:06 +01:00 committed by GitHub
parent 485b3b1203
commit 260de1c2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

@ -447,7 +447,7 @@ shadow_soft_radius (Soft shadow radius) float 5.0 1.0 15.0
# Set the tilt of Sun/Moon orbit in degrees.
# Value of 0 means no tilt / vertical orbit.
# Minimum value: 0.0; maximum value: 60.0
shadow_sky_body_orbit_tilt (Sky Body Orbit Tilt) float 0.0 0.0 60.0
shadow_sky_body_orbit_tilt (Sky Body Orbit Tilt) float 0.0 -60.0 60.0
[**Post processing]

@ -103,10 +103,8 @@ Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShade
m_directional_colored_fog = g_settings->getBool("directional_colored_fog");
if (g_settings->getBool("enable_dynamic_shadows")) {
float val = g_settings->getFloat("shadow_sky_body_orbit_tilt");
m_sky_body_orbit_tilt = rangelim(val, 0.0f, 60.0f);
}
if (g_settings->getBool("enable_dynamic_shadows"))
m_sky_body_orbit_tilt = g_settings->getFloat("shadow_sky_body_orbit_tilt", -60.0f, 60.0f);
setStarCount(1000);
}