17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 22:47:28 +01:00

fix(render): dark parts of a cab and of the running gear are no longer crushed to black, as the AgX look raises its contrast power from 1.0 in the shadows up to 1.6 only from the middle tones on, which keeps the bright tones, the outside view and the night as they were but leaves black knobs, levers and lettering visible on a black desk; the light of a cab can be scaled with gfx.cab.ambient, 1.0 by default

This commit is contained in:
maj00r
2026-10-14 16:55:43 +02:00
parent 20cf81b362
commit 000b8656cc
4 changed files with 10 additions and 1 deletions

View File

@@ -3939,6 +3939,8 @@ bool opengl33_renderer::Render_cab(TDynamicObject const *Dynamic, float const Li
}
auto const old_ambient { light_ubs.ambient };
light_ubs.ambient *= Global.gfx_cab_ambient;
light_ubo->update( light_ubs );
auto const luminance { Global.fLuminance * ( Dynamic->fShade > 0.0f ? Dynamic->fShade : 1.0f ) };
if( Lightlevel > 0.f ) {
// crude way to light the cabin, until we have something more complete in place