Commit Graph

21 Commits

Author SHA1 Message Date
Loic Blot
951f1201c4
Modernize various files (src/k*, src/l*)
* range-based for loops
* code style
* C++ headers instead of C headers
* Default operators
2017-08-18 08:21:01 +02:00
Vitaliy
9c8fec83af New lighting curve (#5279)
* New lighting curve

* Make polynomial lighting curve

* Update default lighting settings
2017-08-17 00:23:20 +02:00
Auke Kok
094a5a73d3 Redo light.cpp.
Remake the light_decode_table.

The table starts out without pre-filled in values since those
are always discarded by the code apparently. We calculate a
pseudo curve with gamma power function, and then apply a new
adjustment table.

The adjustment table is setup to make the default gamma of 2.2
look decent: not too dark at light level 3 or so, but too dark
at 1 and below to be playable. The curve is much smoother than
before and looks reasonable at the whole range, offering a
pleasant decay of light levels away from lights.

The `display_gamma` setting now actually does something logical:
the game is darker at values below 2.2, and brighter at values
above 2.2. At 3.0, the game is very bright, but still has a good
light scale. At 1.1 or so, the bottom 5 light levels are virtually
black, but you can still see enough detail at light levels 7-8,
so the range and spread is adequate.

I must add that my monitor is somewhat dark to begin with, since
I have a `hc` screen that doesn't dynamic range colors or try to
pull up `black` pixels for me (it is tuned for accurate color and
light levels), so this should look even better on more dynamic
display tunings.
2016-12-28 14:16:39 -08:00
Craig Robbins
5a1975a4e3 Change lower limit of display_gamma to 1.0 (linear light)
Now matches function comment
2015-05-11 02:03:09 +10:00
Craig Robbins
3d29be24e0 Add display_gamma option for client 2014-12-31 02:44:31 +10:00
Sfan5
6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola
037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Perttu Ahola
af29c0ade5 Unrelated, but anyway: tune light levels again 2012-03-27 19:25:25 +03:00
Perttu Ahola
e15de8b70d Modify light values to work a bit better with non-smooth lighting 2012-02-05 12:02:40 +02:00
Perttu Ahola
a1eb2836c0 Set better visual light levels 2012-02-02 16:14:32 +02:00
Perttu Ahola
ffb1128951 tested out and commented out some new stuff for the terrain generator, to be used in the future. 2011-04-26 15:38:42 +03:00
Perttu Ahola
4c2b9ed516 random code cleaning, shouldn't affect anything 2011-02-18 22:25:25 +02:00
Perttu Ahola
102c5e31fe all kinds of tweaking and fixing 2011-02-04 01:22:07 +02:00
Perttu Ahola
9b1b57a523 some tweaking 2011-02-02 18:46:14 +02:00
Perttu Ahola
0ca9423b8b day/night working client side 2010-12-19 16:51:45 +02:00
Perttu Ahola
240499dc2c before daynight mesh cache 2010-12-18 17:46:00 +02:00
Perttu Ahola
15a43c5ed0 before adding day/night lighting
--HG--
rename : data/light.png => data/cloud.png
2010-12-18 13:10:37 +02:00
Perttu Ahola
571fb14f94 working nicely 2010-12-13 03:19:12 +02:00
Perttu Ahola
fc26dcdb19 license stuff
--HG--
rename : src/licensecomment.txt => licensecomment.txt
2010-11-29 20:13:04 +02:00
Perttu Ahola
4e249fb3fb Initial files 2010-11-27 01:02:21 +02:00