18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 16:27:11 +01:00
Commit Graph

43 Commits

Author SHA1 Message Date
lcddisplay 3de73b0e85 Windscreen snow: the layer over the rectangle of the glass, one for the cab
The layer of 1024 x 1024 texels over the whole uv gave a glass taking a part
of its texture too few of them (the EP09 104ec: ~470 across the glass, 1.8
pixels of the screen a texel at 1080p), so the lumps came out soft. Now the
layer lies over the rectangle of the uv the glass takes, its 2M texels across
and down as the glass is wide and high (~1 mm a texel); the renderer works
it out from the map of the glass when it sets the glass up and puts it in
the storage (water.glsl, water_layer_rect).

One layer, for the first glass of the snow of the cab (a cab has one as a
rule); a second one lays its snow at every pixel as before the layer, the
same look, slower. The storage of the water: 58 MiB before the layers,
82 MiB now (106 MiB with the four layers of 1024 x 1024).

No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:13 +01:00
lcddisplay 02a0de85c2 Windscreen snow: lay the sprites into a layer of the glass, the glass only reads it
The glass of the snow laid its nine grids of lumps (81 cells) and its flakes
at every pixel in every frame, ~6-9 ms of the GPU at 1080p. Now a compute
pass (water_snowlayer.comp, the sprites in snow_sprites.glsl) lays the snow
of a glass into a layer of 1024 x 1024 texels over its uv after the step of
the snow: a band of every 8th row in a step (the snow under a lump changes
slowly) and at once wherever a blade went over the glass. The glass reads
the layer filtered (mat_snow_windscreen.frag), as the glass of the rain
reads its cells. Laid front to back: a texel stops once the snow over it
covers it, and a cell reads the map only when its sprite reaches the texel.

The storage of the water grows by the layers, 12 MiB for each of the four
glasses. The look stays as it was.

No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:13 +01:00
Claude 2fe11d39a1 Rain windscreen: the rain fallen since a blade went over each place of its sweep
The glass took the rain fallen since one of the two moments the blades were at the ends of their
sweep, picked by the way the blade was going. After a pass that gave a place the blade had just
wiped the rain of the sweep before, until the blade reached the other end: the haze and the drops
there jumped back and forth with every sweep (a jump in brightness under the wiper mask, best seen
in a light rain).

Now the renderers keep, for 64 places along the sweep of each blade (the value of the wiper mask),
the rain fallen when the blade last went over them (gl::scene_ubs::wiper_rain_pass, marked for all
the places a blade went over since the last frame), and the glass reads the one of its pixel.
wiper_rain_out / wiper_rain_return are gone; the timers and the insects keep the ends of the sweep.

No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:10 +01:00
Claude 394e252daf Rain windscreen: the cells of the drops and rivulets worked out once a frame
The glass with rain worked out, in every pixel, the hashes and the life cycles of the 9 drop cells around it, of the rivulet
cells of its 5 layers and of those the drops are swept by. A compute pass (rain_cells.comp) now does it once a frame for every
cell into a buffer (rain_cells.glsl: RAIN_CELLS_SSBO in the pass set of Vulkan 1.4, binding 18 in OpenGL 4.6); the glass only
reads it, and asks the wipers only for the drops the pixel lies on. The hashes are the same, so the drops and the rivulets
are where they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:09 +01:00
Hirek 0bc29af650 Merge remote-tracking branch 'origin/feat/switch-fastenings' into feat/renderers-cleanup 2026-10-31 17:13:45 +01:00
Hirek 96100f1155 Draw the cab probe with all the lights of the cab 2026-10-29 20:05:03 +01:00
Hirek e8a90507f0 Light the cab with the sun coming in through its windows 2026-10-28 12:19:43 +01:00
Hirek 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
Hirek 9dde5b0e5e Take the ambient occlusion into the lighting and add a probe of the cab 2026-10-27 13:23:52 +01:00
Hirek 719c729929 Improve rain shader 2026-10-26 15:51:56 +01:00
Hirek f20b1a3071 Replace cubemap scenery reflections with SSR, add Vulkan ray traced reflections 2026-10-25 13:54:49 +01:00
Hirek 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
Hirek bd589f272d feat(vulkan): vulkan 1.4 core with the user interface and the launcher, shaders split into ogl46/vk14 with SPIR-V binaries loaded first 2026-10-24 05:47:11 +02:00
maj00r 85b76acca5 perf(sleepers): the instances of the sleepers and timbers of a track sent to the gpu once, as it's laid, and kept there in a buffer of their own; in each pass the runs of them in sight turned by the modelviews of their cells into the instance buffer of the frame by a compute pass, one dispatch and one barrier a pass, and drawn in one instanced draw for each model, part and level of detail, in place of the cpu turning every instance every frame 2026-10-24 01:40:34 +02:00
Hirek 867497b658 Simulate and light the smoke on the GPU and make rain and snow of particles 2026-10-20 16:44:27 +02:00
Hirek 8c00b0bc3d Fit the cascades of the sun shadows to the depth of the view 2026-10-19 12:02:01 +02:00
Hirek bc4df5567f Cull and draw the sleepers of tracks on the GPU with the instances 2026-10-18 03:18:26 +02:00
Hirek 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
Hirek 27e5c07837 Add screen-space contact shadows for the sun, lamps and headlights 2026-10-17 03:11:47 +02:00
Hirek 6ee628aaa5 Steady the volumetric fog and add a switch for the old headlight beams 2026-10-16 23:23:51 +02:00
Hirek 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
Hirek 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
Hirek 466cb5339e Draw instances from the GPU culling with indirect draws, occlusion culling and a depth prepass 2026-10-16 12:54:52 +02:00
Hirek 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
Hirek 06d7b9e9f0 Cast shadows of the cab lamp from the cab in the GL 4.6 renderer 2026-10-16 02:43:27 +02:00
Hirek 4d3a401aae Cull and assign LOD to instances in a compute pass 2026-10-16 01:08:44 +02:00
Hirek 9277c28805 Cull instances by compact records and draw them from a shader storage buffer 2026-10-16 00:37:54 +02:00
Hirek ce725c3d62 Add sky light, physical atmosphere, auto exposure and bloom to the GL 4.6 renderer 2026-10-15 22:16:41 +02:00
Hirek 9f2ae071a6 Use clustered light lists in forward shading 2026-10-15 16:16:53 +02:00
Hirek 6aa6e505e8 Cull lights into clusters in a compute pass 2026-10-15 15:21:21 +02:00
Hirek f85cf5fe52 Build view-space light cluster grid in a compute pass 2026-10-15 14:16:55 +02:00
Hirek c0f45184b8 Move light data from UBO to std430 SSBO 2026-10-15 13:20:59 +02:00
Hirek 3419666070 scale/endscale/localscale per node model 2026-05-10 13:12:49 +02:00
Hirek 587077629f Enable instancing 2026-05-09 23:29:20 +02:00
Wls50 b4737712de support cabview rain effect 2025-11-21 22:43:24 +01:00
milek7 56eba08a6f CI shader validation 2021-01-21 15:51:03 +01:00
milek7 1c40578d26 ubo padding fixes 2020-10-21 17:59:27 +02:00
tmj-fstate 2ce3091e8f line breaker cab control enhancement, minor bug fixes 2020-02-02 22:30:36 +01:00
tmj-fstate 14699a96de build 200101. opengl 3.3 renderer projected headlights 2020-01-01 20:41:05 +01:00
tmj-fstate 63619d13a6 opengl 3.3 renderer cascaded shadow maps, minor gfx renderer optimizations 2019-12-05 17:19:49 +01:00
tmj-fstate 194400e1af inversed view transform uniform 2019-11-29 16:20:21 +01:00
tmj-fstate a74402804d gfx renderers standardization, bug fixes 2019-11-07 00:28:59 +01:00
tmj-fstate 0fd23a53d9 milek7/sim branch opengl 3.3 renderer import 2019-10-26 15:17:09 +02:00