1
0
mirror of https://github.com/moparisthebest/minetest synced 2025-03-09 22:29:41 -04: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
..
2016-12-26 22:36:22 +01:00
2016-12-26 22:36:22 +01:00
2015-05-12 21:07:46 +02:00
2016-12-26 22:36:22 +01:00
2016-12-26 22:34:29 +01:00
2016-12-20 17:17:38 +10:00
2016-03-19 21:27:57 -04:00
2015-08-23 22:04:06 -04:00
2015-12-07 13:51:41 -05:00
2016-02-11 16:55:15 +01:00
2016-02-11 16:55:15 +01:00
2016-09-21 08:04:11 +02:00
2016-07-05 21:40:13 +02:00
2016-07-05 21:40:13 +02:00
2015-11-06 08:51:14 +01:00
2016-12-28 14:16:39 -08:00
2016-12-26 22:36:22 +01:00
2015-08-25 18:33:52 -04:00
2016-12-20 17:17:38 +10:00
2015-12-07 13:51:41 -05:00
2015-08-25 18:33:52 -04:00
2015-07-08 10:12:44 +02:00
2016-12-26 22:36:22 +01:00
2016-06-03 19:42:57 +02:00
2016-02-18 16:43:29 +01:00
2015-10-14 01:03:54 -04:00
2015-10-26 15:14:22 +01:00
2016-12-26 22:36:22 +01:00
2016-07-10 00:00:14 +10:00
2016-07-03 21:49:33 +02:00
2015-07-23 07:38:13 +02:00
2015-08-25 18:33:52 -04:00
2016-11-12 06:41:04 +00:00
2016-11-12 06:41:04 +00:00
2016-12-28 14:16:39 -08:00
2015-11-06 08:51:14 +01:00
2016-10-27 08:04:42 +02:00
2016-06-11 23:35:17 +01:00
2016-12-12 07:19:05 +00:00
2016-10-27 08:04:42 +02:00
2016-10-27 08:04:42 +02:00
2016-11-12 06:41:04 +00:00
2016-11-12 06:41:04 +00:00
2016-02-19 21:31:22 +01:00
2016-02-19 21:31:22 +01:00
2016-03-02 23:23:31 -05:00
2016-03-19 21:27:57 -04:00
2016-06-11 23:35:17 +01:00
2016-06-11 23:35:17 +01:00
2016-06-04 02:16:06 -04:00
2016-06-04 01:51:44 -04:00
2016-05-01 15:32:02 +02:00
2015-12-07 13:51:41 -05:00
2015-12-07 13:51:41 -05:00
2015-08-23 22:04:06 -04:00
2015-08-23 22:04:06 -04:00
2016-11-05 10:25:30 +01:00
2016-05-23 11:48:30 -04:00
2016-12-26 22:34:29 +01:00
2016-10-13 17:33:16 +02:00
2016-02-11 16:55:15 +01:00
2016-02-11 16:55:15 +01:00