18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 05:04:58 +01:00
Commit Graph

47 Commits

Author SHA1 Message Date
pawelw
3710f87fc5 feat(gl46): street lamps of the scenery light their surroundings (#371)
* Local lights: street lamps of the scenery light their surroundings

Optional settings, all off by default (nothing changes without them):
- gfx.lights.stars: Stars submodels (e.g. "lamp" of the SGP340 street lights) whose glowing points light downwards as lamps;
  signal LEDs, chimneys and the sky only glow
- gfx.lights.points.near: scenery lamps shining downwards light also closer than their glare is seen from
- gfx.lights.freespot.mincone: wider cones for scenery lamps shining downwards (many have the narrow cone of their glare)
- gfx.lights.lamps.gain: brightness of the scenery lamps shining downwards
- gfx.lights.hideglow: textures of the planes faking the light of lamps (pools of light, glows), hidden while the lamps light

Lights shining sideways (signals) keep their cones, brightness and distances.
The lamps made of glowing points are gathered also from the opaque instances of a cell.

* Local lights: the lamp settings in a parser of their own, the draw phase test in a helper

The entries of the lamps are read by ConfigParse_gfx_lamps, which the parser of the sky hands the tokens it doesn't know, and
the opaque and translucent draws ask drawn_in_phase whether a submodel has a part in them, so the long functions keep their
complexity. The fake glow cache is private, the colour of a light point is lightcolor (no shadowing of rendermode::color),
the minimal distance of a submodel comes from walk_min_distance and the lit instances of a cell from add_lit_instances.

* Settings: the lamp entries are tried by the main loop of the parser, the parser of the sky stays as it was

* Local lights: the fake glows are left out only within the reach the lamps are gathered from

Beyond gfx.lights.range nothing lights the ground in place of the pools of light and glows of the lamps, so a scenery model
keeps them there. Render_Alpha(TAnimModel *) tells hide_fake_glows() which model it draws, and is_fake_glow() leaves out the
glows of that model only, when it is within the range (and its radius) of the camera the lamps are gathered around. The glow
planes are translucent, so the opaque draws are as they were.

* Local lights: hide_fake_glows() takes the model as it is drawn (radius() isn't const)

* Local lights: the fake glows hidden at any distance again, gfx.lights.lamps.range to see the lamps from afar

Glow planes kept beyond the reach of the lamps don't light a distant station either, they only float above it, so the glows
listed in gfx.lights.hideglow are left out at any distance again. A lit station is seen from afar with gfx.lights.lamps.range
instead: the lamps are gathered from that far when it's above gfx.lights.range (0, the default: from gfx.lights.range).

* Local lights: gfx.lights.lamps.range for the lamps of the scenery only, the vehicles keep gfx.lights.range

* Local lights: the fake glows are kept with gfx.lights.range 0, the limits of gfx.lights.hideglow in the docs
2026-11-20 04:25:18 +01:00
9071d3f4d3 Improved water shader 2026-11-16 22:55:33 +01:00
96100f1155 Draw the cab probe with all the lights of the cab 2026-10-29 20:05:03 +01:00
91c6324965 Add the optional LightOnly of FreeSpotLight 2026-10-28 21:50:08 +01:00
8c6a47f42c Light the occupied cab with the light points of its model 2026-10-28 21:16:22 +01:00
65e104f813 Light the occupied cab with the light points of its model 2026-10-28 21:06:02 +01:00
9904eddd0d Light the cab with cablight/dashboardlight light points of the cab model 2026-10-28 20:55:45 +01:00
413cebed9c Hold the sky back only around tunnels and keep the cab lit by day 2026-10-28 14:01:37 +01:00
e8a90507f0 Light the cab with the sun coming in through its windows 2026-10-28 12:19:43 +01:00
c44b243698 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 17:11:06 +01:00
2a876befb0 Shade the sky and the sun by the scenery around the camera instead of the track environment flags 2026-10-27 16:02:36 +01:00
9dde5b0e5e Take the ambient occlusion into the lighting and add a probe of the cab 2026-10-27 13:23:52 +01:00
ac0b4e5f15 Add a white balance to the tonemapping 2026-10-27 01:40:19 +01:00
a6bdeeaa2b Add DLSS Frame Generation (gfx.framegeneration x2/x3/x4) and Reflex (gfx.reflex) to the Vulkan renderer 2026-10-25 20:52:12 +01:00
1841e6d7b0 Add NVIDIA DLSS to the Vulkan renderer (gfx.antialiasing dlss/dlaa) and gfx.buffer.percent 2026-10-25 19:35:33 +01:00
71a6628a4a Vulkan ray tracing: shade the heightmap terrain from its layers; longer default SSR range 2026-10-25 17:15:58 +01:00
08f4f6ed60 Vulkan ray tracing: include tracks and roads, build triangle strips and fans 2026-10-25 15:35:26 +01:00
f20b1a3071 Replace cubemap scenery reflections with SSR, add Vulkan ray traced reflections 2026-10-25 13:54:49 +01:00
252b9373ea Add gfx.antialiasing (off, msaax2/x4/x8, taa) with temporal anti-aliasing in the GL 4.6 and Vulkan renderers 2026-10-25 05:17:41 +01:00
12c2aaf1db chore: remove the NVRHI-based betterRenderer 2026-10-21 19:30:32 +02:00
cf36b24e8d Let the smoke leave the exhaust as a widening jet that fades in 2026-10-20 18:00:51 +02:00
abbdca4773 Let the templates of smoke sources set how fast their particles rise or fall 2026-10-20 17:12:23 +02:00
867497b658 Simulate and light the smoke on the GPU and make rain and snow of particles 2026-10-20 16:44:27 +02:00
dfbe8a6d9e feat(gl46): leave out instance buckets beyond their range before the culling 2026-10-20 14:57:30 +02:00
b1f880b5a7 Cull the scenery models drawn on their own on the GPU with the instances 2026-10-19 10:54:04 +02:00
ffe77be754 Cull the instances of the shadow maps of headlights and lamps on the GPU 2026-10-18 23:14:08 +02:00
64dedb9d53 Record the opaque scene once and replay it for the depth prepass and the colour pass 2026-10-18 21:00:54 +02:00
2e30366235 Draw the recorded instance draws with the variant seed they were recorded with 2026-10-18 18:41:33 +02:00
bc4df5567f Cull and draw the sleepers of tracks on the GPU with the instances 2026-10-18 03:18:26 +02:00
f4b516eeb8 Cull shadow and reflection passes on the GPU 2026-10-18 01:46:45 +02:00
494304903f Draw the instances from the GPU with multi draws, the model block of each draw read by its number 2026-10-18 00:47:05 +02:00
7221c153dd Let eu07.ini scale how much the moon lights the scenery at night (gfx.moonlight) 2026-10-17 23:10:01 +02:00
435110cef9 Place the sun and the moon where they are and light the night by the phase of the moon 2026-10-17 22:47:24 +02:00
5a5c67aaaf Let the instances drawn from the GPU hide one another, in two phases 2026-10-17 21:50:23 +02:00
27e5c07837 Add screen-space contact shadows for the sun, lamps and headlights 2026-10-17 03:11:47 +02:00
97112b143b Draw the depth of the whole scene before its colour 2026-10-17 02:15:50 +02:00
f352718e4a Stream model data through persistently mapped buffers 2026-10-17 01:24:33 +02:00
8b929fc1da Give the volumetric clouds lumps, sky and ground light and a fog colour by the angle from the sun 2026-10-16 22:25:11 +02:00
2be85410ce Draw volumetric clouds, their shadows, a volumetric fog and catalogue stars from a new weather system in the GL 4.6 renderer 2026-10-16 21:44:47 +02:00
d509775269 Cast shadows of vehicle headlights from the scene in their beam in the GL 4.6 renderer 2026-10-16 14:13:36 +02:00
466cb5339e Draw instances from the GPU culling with indirect draws, occlusion culling and a depth prepass 2026-10-16 12:54:52 +02:00
2f0a06b98e Cast shadows of scenery lamps from the scenery, nearby vehicles and the cab in the GL 4.6 renderer 2026-10-16 11:32:45 +02:00
06d7b9e9f0 Cast shadows of the cab lamp from the cab in the GL 4.6 renderer 2026-10-16 02:43:27 +02:00
fd98d4eea5 Light the scene with lamps of models, vehicle compartments and the cab lamp in the GL 4.6 renderer 2026-10-16 00:07:08 +02:00
5f365a00c5 Fix the screen space ambient occlusion and add ground truth ambient occlusion to the GL 4.6 renderer 2026-10-15 23:03:50 +02:00
ce725c3d62 Add sky light, physical atmosphere, auto exposure and bloom to the GL 4.6 renderer 2026-10-15 22:16:41 +02:00
f47172f34d Migration cleanup and renderer documentation 2026-10-15 19:05:35 +02:00