diff options
author | Paramat <paramat@users.noreply.github.com> | 2019-10-24 01:08:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-24 01:08:49 +0100 |
commit | 1f142ec06fc146464822a322fdf39bddb680bfe6 (patch) | |
tree | 3b508ac3a0a59ff07e41e6c33a42c1e30b10c175 /builtin | |
parent | cd35949cd07dff9f64f982b7a28999b89dfbeb5a (diff) | |
download | minetest-1f142ec06fc146464822a322fdf39bddb680bfe6.tar.gz minetest-1f142ec06fc146464822a322fdf39bddb680bfe6.tar.bz2 minetest-1f142ec06fc146464822a322fdf39bddb680bfe6.zip |
Improve light curve parameter limits and documentation (#9054)
Revert gamma upper limit to 3.0 because that was raised based on
a misunderstanding and had no benefit. A sane upper limit is
needed as players on a competitive server tend to use the maximum.
Set gamma lower limit to 0.33 for consistency with 3.0.
Set sane limits on alpha, beta, boost and enforce these in code
to limit values entered in minetest.conf and to avoid easy cheating
by editing settingtypes.txt.
Improve documentation and 'readable' setting names.
Clarify that gamma does not significantly affect natural night light.
light.cpp: Various codestyle and comment improvements.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/settingtypes.txt | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index fa6591c2f..feb29c2e2 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -639,25 +639,34 @@ vsync (VSync) bool false # Field of view in degrees. fov (Field of view) int 72 45 160 -# Adjust the gamma encoding for the light tables. Higher numbers are brighter. -# This setting is for the client only and is ignored by the server. -display_gamma (Gamma) float 1.0 0.5 10.0 +# Alters the light curve by applying 'gamma correction' to it. +# Higher values make middle and lower light levels brighter. +# Value '1.0' leaves the light curve unaltered. +# This only has significant effect on daylight and artificial +# light, it has very little effect on natural night light. +display_gamma (Light curve gamma) float 1.0 0.33 3.0 # Gradient of light curve at minimum light level. -lighting_alpha (Darkness sharpness) float 0.0 0.0 4.0 +# Controls the contrast of the lowest light levels. +lighting_alpha (Light curve low gradient) float 0.0 0.0 3.0 # Gradient of light curve at maximum light level. -lighting_beta (Lightness sharpness) float 1.5 0.0 4.0 - -# Strength of light curve mid-boost. -lighting_boost (Light curve mid boost) float 0.2 0.0 1.0 - -# Center of light curve mid-boost. -lighting_boost_center (Light curve mid boost center) float 0.5 0.0 1.0 - -# Spread of light curve mid-boost. -# Standard deviation of the mid-boost Gaussian. -lighting_boost_spread (Light curve mid boost spread) float 0.2 0.0 1.0 +# Controls the contrast of the highest light levels. +lighting_beta (Light curve high gradient) float 1.5 0.0 3.0 + +# Strength of light curve boost. +# The 3 'boost' parameters define a range of the light +# curve that is boosted in brightness. +lighting_boost (Light curve boost) float 0.2 0.0 0.4 + +# Center of light curve boost range. +# Where 0.0 is minimum light level, 1.0 is maximum light level. +lighting_boost_center (Light curve boost center) float 0.5 0.0 1.0 + +# Spread of light curve boost range. +# Controls the width of the range to be boosted. +# Standard deviation of the light curve boost Gaussian. +lighting_boost_spread (Light curve boost spread) float 0.2 0.0 0.4 # Path to texture directory. All textures are first searched from here. texture_path (Texture path) path |