18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Files
maszyna/environment
maj00r 767bcb4682 fix(sky): the legacy renderer gets the sky, ambient and fog of 26.05 again (#415)
* fix(sky): the legacy renderer gets the sky, ambient and fog of 26.05 again

The colours of the sky dome were made for the full renderer, which
tonemaps them and draws to an sRGB framebuffer: the sRGB matrix, the
gamma put on the brightness, a lighter gradient and a band of light
at the horizon (40c21bd4, b46c8c76, 8df81eb4), and the fog no longer
dimmed by the diffuse level (#229). The legacy and simple renderers draw
these colours as they are, and the ambient light and the fog are taken
from them, so all three differed from 26.05 there.

With Global.LegacyRenderer the dome is computed as in 26.05: the Adobe
RGB matrix, the brightness knee at 0.85, the sky tone saturated as the
colour, the plain gradient and the gamma of 0.45 by day at the end; the
fog is lit by the key light at its diffuse level. The full renderer is
unchanged. The turbidity under overcast is a separate fix (#410).

* fix(test): a test run takes the legacy and the simple renderer flag off with the renderer

From the review of #415: apply_test_mode_settings() sets the null renderer
but left Global.LegacyRenderer and Global.BasicRenderer as the gfxrenderer
line of eu07.ini made them. With this PR the legacy flag picks the colours
of the sky dome, and their average is the light level the scenery lamps,
the AI's compartment lights and Python's light_level go by. The same --test
run on a machine with "gfxrenderer legacy" and on one with the default
renderer computed different skies and could switch those lights at other
times. A test run now always takes the sky of the full renderer, as on
master. The context of a test run doesn't depend on the flag (it asks for
none in particular), and its multisampling is off, so nothing else changes.

---------

Co-authored-by: maj00r <maj00r@host>
2026-11-24 19:28:02 +01:00
..
2026-06-30 21:19:46 +02:00