aboutsummaryrefslogtreecommitdiff
path: root/src/daynightratio.h
AgeCommit message (Collapse)Author
2019-10-18Make natural night light as bright as MT 0.4.16 (#9053)Paramat
2019-04-08daynightratio.h: Improve codestyle, minor optimisations (#8453)Paramat
2019-04-04Stabilise 'day night ratio' to fix object brightness flicker (#8417)Paramat
Previously, when basic shaders were enabled, the function time_to_daynight_ratio() returned values jumping between 149 and 150 between times 4375 and 4625, and values jumping between 999 and 1000 between times 6125 and 6375, (and the corresponding times at sunset) due to tiny float errors in the interpolation code. This caused the light level returned by blend_light() to jump between 14 and 15, which became noticeable recently as those light levels were given different visual brightnesses. Add early returns to avoid the problematic interpolation, and to avoid unnecessary running of the loop.
2017-08-17Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot
* Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio)
2017-08-17C++ modernize: Pragma once (#6264)Loïc Blot
* Migrate cpp headers to pragma once
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2012-12-02Smooth day-night transitionsPerttu Ahola
2012-06-05Switch the license to be LGPLv2/later, with small parts still remaining as ↵Perttu Ahola
GPLv2/later, by agreement of major contributors
2012-03-18Dynamic sky, fog and cloud colors; sun and moonPerttu Ahola