18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 15:17:08 +01:00
Commit Graph

4549 Commits

Author SHA1 Message Date
Hirek d631837796 Merge pull request #367 from lcddisplay/feat/windscreen-weather-gl46
Windscreen weather (rain, bugs, snow), moths, deer and VAT animation for OpenGL 4.6 / Vulkan 1.4
2026-11-29 12:50:39 +00:00
Claude 231bd3eb84 Bugs: the big and the huge ones smaller (2.5x and 5x the normal ones, were 4x and 9x)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 12:53:29 +01:00
Claude 7cea551157 Wipers and insects: the views from outside the cab follow the train driven
The new views of the consist put the camera at any vehicle of the train, one with an active cab of
its own too: taken for another vehicle, it wiped the insects met and the memory of the blades, so
the insects were gone from the glass after a change of the view. Outside the cab (FreeFlyModeFlag)
the glasses now follow the train driven, in both renderers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 12:53:29 +01:00
Claude 5d6f443450 Review 28.11: rain cells always bound, the velocity target and the blur pass only when needed
- the cells of the rain: the opengl renderer makes their storage (cleared) with the first bind and keeps it
  bound, the glasses read the cells only when they were worked out in the frame (scene_ubs.rain_state.w,
  both renderers): never the storage before the first rain, nor the stand-in of the vulkan renderer
- the pass of the motion blur and (opengl) the velocities drawn only in the frames which need them: the
  motion blur with something moving, the taa, or a glass of the rain, the insects or the snow in the view
  (windscreen_water::wants_glass_requests(): the cab seen from inside has one, or the view is not from the
  cab). the glasses keep their drops and haze with the motion blur off, the motion is blurred by 0 then

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 12:53:29 +01:00
Claude d8dc11aab2 Rebase onto staging (after #531)
The vehicle's physics is TDynamicObject::physics now (physics::Vehicle): the wipers, the insects and the
rain of the glasses, the snow of the windscreen water and the deer take it from there. The includes of
staging kept in opengl46renderer.cpp; the texture check of staging first in
Render_Instances_Indirect_Shadow(), then the materials with a vertex shader of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:53 +01:00
Claude 559d105aa4 Deer: take fright by the speed of the train, run over slopes leaning with the ground
A grazing deer takes fright when the train is deer.reactiontime seconds of its speed away (default 3.5 s: it needs 2.0-2.75 s
from the alarm to be off the track), but no nearer than deer.reactiondistance (default 20 m) for a slow or a standing train. So
the slower the train, the closer it gets before the deer runs. The horn (deer.hornrange) sends it off sooner, as before.
deer.fleedistance, of the test builds of this feature only and never in a release, goes; an eu07.ini that still has it is read
with its value passed over.

The way a deer runs away may go down the slope of an embankment (to 6 m below the sleepers) or up the one of a cutting (to 4 m
above them), no steeper than 35 degrees between the samples of the ground, now 17 of them, about 1.5 m apart. Water, walls and
cliffs still keep a deer away. Running, the deer leans up and down the slope by the ground under its hooves (at most 30 degrees,
smoothed, about its side axis, which keeps the turn the shader reads the clip and the moment from), and grazes leaning where it
stopped, drawn on its own, out of the groups of the instances of its model.

No change to the assets: the same models and textures of the deer (models/animals/jelen_*.t3d, textures/animals/jelen_*).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-29 11:39:15 +01:00
Claude 5ce5a531b8 Windscreen water: a glass with drops is one with an atlas of drops, not of the snow (wants_rain_cells())
mat_rain_windscreen has no param water_slot (only the glasses of the snow have a slot of their own), so wants_rain_cells() never found the glass of the rain and the cells weren't worked out: the glass showed only its fine droplets. A material of the cab with raindropsatlas and without snow_slot now (the insects too, which don't come with rain).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude 160e8b8a46 Windscreen water: the review of 27.11 (the snow list stops when full, the cells of the rain only for a cab with a glass of the rain)
- snList() stops listing when its SN_REFS are taken: no lumps worked out for nothing, and the cover of the texel counts only the
  sprites the glass lays (no gaps where it took the dropped ones for covering); OpenGL 4.6 and Vulkan
- update_rain_cells() gets no rain for a cab without a material of the shader of the rain in this weather
  (windscreen_water::wants_rain_cells(); as before when the simulation isn't used)
- Vulkan: a rain-cell buffer which can't be made leaves the glasses with rain dry (a small stand-in the pass sets hold) instead of
  failing the whole windscreen water; it is still made at the start, since the pass sets and those of the cullings hold it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude a9579a9841 Rebase onto staging (after #468): the water programs made ahead with the snow passes and the rain cells
- opengl46water: the two passes of the snow join PROGRAM_NAMES and prepare_next() (#476), optional as before: one which doesn't
  compile leaves the snow out (both passes) and the rain working; rain_cells.comp is made ahead too (its storage still waits for
  the first rain), so the first rain doesn't compile it in the middle of a frame; program_count() counts it
- vulkan14indirect: the path of the materials with their own shadow program passes the pending flag of multidraw_program()
- opengl46renderer.h: staging's shader_prewarm kept with m_ownvertexprograms / m_materialshadowprograms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude 29dcfd3769 Drop what the rebase fix-up c0ebdd5 brought back that the base no longer has
The second "null" renderer branch of select_gfx_backend(), the opaque text displays (Render_text) and the catch of
std::exception in scenarioloader_mode::update(): the base's own code again (std::runtime_error, its own null branch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude 44eedbbc97 Windscreen snow: five grids of lumps, six sprites a texel at most, lighter to lay [skip ci]
Laying the sprites took most of the snow on the glass (a covered glass ~1.0 ms at 2560x1440): nine grids, each covering the
glass a few times over, put many sprites one on another at a pixel. Five grids (the same sizes and tiles, the snow they need
from 0.02 to 2.6 mm) still close the glass; the layer lists at most six sprites a texel, two flakes and the top lumps (those
under them are covered): ~0.6 ms. Also the flakes as glassy as 0.5 (were 0.35), the lumps of thin snow at most 0.88 opaque so the
flakes under them show through, and a sprite reads the snow of the texel of the map under its centre (two reads, not eight).
OpenGL 4.6 and Vulkan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude 6db46bbc83 Windscreen snow: the air at speed blows off only thin dry snow, fewer flakes bounce off [skip ci]
SNOW_BLOW halved, blown up to 0.25 mm (was 0.6 mm), 15% of the dry flakes bounce off at speed (was 40%): the glass gets covered at 100 km/h too, a little slower than slowly (OpenGL 4.6 and Vulkan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude 05be4bff29 Windscreen water: the passes of the snow are optional
A snow kernel that doesn't compile (as water_snow.comp did on NVIDIA) leaves the glasses of the snow clear and the rain working, instead of disabling the whole simulation (OpenGL 4.6 and Vulkan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude ab3b0e1565 Moths: a swarm doesn't flip its visibility at the range of the lamp lights
A swarm shown before stays shown while its lamp is out of the lights of the frame by its distance (the range of its node hides it there), so node_state_version changes only when a lamp goes out, not each time the camera passes the range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude d896c7d81d Windscreens: the insects and the rain the glass meets advance once a frame, not once a view
The step is taken in the first view of a frame (the views of a frame share its time); OpenGL 4.6 and Vulkan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:15 +01:00
Claude d9980b78f7 Deer: LocalRandom(), not the seeded random engine of the simulation
The spawning, the side, the angle and the first frame of a deer no longer draw from Random(), so they don't shift the simulation of a seeded run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude 5fe115657f Windscreen snow: a glass takes its slot on the material the cab has now, no fallback to the first glass in the shader
The renderer may give a glass a fresh copy of its material after the weather changed; the glass keeps its first submodel and re-resolves its material in assign(true). The fallback of mat_snow_windscreen (any material without a slot took the snow of the first simulated glass) is gone (OpenGL 4.6 and Vulkan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude da8f06dde1 Rebase onto feat/gl46-migration: the code of the base the replayed hunks covered, back
The rebase replayed the hunks of this branch over the ones of feat/gl46-migration where both touched the same lines; this brings
back what of the base they covered: the null renderer, the black box of the camera, the opaque text displays, the motion blur of
the free camera (OpenGL 4.6 and Vulkan), the scenario loader catching std::exception. The log keeps off the console in test mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude 501784ab86 Windscreen snow: bigger flakes and lumps, atlas of fleece only, glassy and white sprites [skip ci]
- the flakes and the lumps bigger; the drops and the wet lumps gone (their atlas slots hold fleece now)
- the lumps take the fleece tiles, most often the marked ones
- each sprite at random from glassy (stuck, half melted, bends the picture) to fully white (dry powder),
  whiter where the snow is thicker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude 48e4ef517f Windscreen water (OpenGL): the mask of the wipers read for the kernels [skip ci]
The OpenGL renderer reads a texture when a draw binds it. The glasses never
draw the mask of their wipers, only the kernels read it, so under OpenGL the
mask stayed unread, the glass was never baked and had no map: no snow (the
log said "glass 1 not baked yet" for good). The kernels now have a texture
they read loaded from its file when nothing read it yet. Vulkan reads its
textures without a draw, so it had this right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude 04e877ffa6 Windscreen snow: compiles with the NVIDIA OpenGL driver, the state of the glasses in the log [skip ci]
- water_snow.comp named a variable "packed", a reserved word of GLSL: the
  NVIDIA OpenGL compiler refused the program, so the whole simulation of the
  windscreens was off under OpenGL. Now "packing".
- mat_snow_windscreen.frag: a material without its slot takes the first
  glass whose snow the simulation keeps.
- The log says, once it changes, whether each glass is baked, what it was
  built as and what its material is now, whether its snow is simulated,
  and whether the layer of the snow is laid: to find why the snow stays off
  under OpenGL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
lcddisplay 26ed8650ff Windscreen: rain rivulets run down the glass in the world, the snow as dense as before [skip ci]
- The rivulets of the weight (mat_rain_windscreen.frag) run down the glass
  in the world whichever way its texture lies on it: their layer is turned
  by a quarter turn at a time to the gravity on the glass in its UV (no turn
  on a glass mapped upright, so it looks the same there).
- The grids of the lumps of the snow use the dense tiles again (2-5) as
  before the change of the tiles, the packed and wet lumps on 3% of the
  cells; the small clump, the dots and the scattered crystals (0, 1, 6, 7)
  only among the flakes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude c4d32ef85f Windscreen bugs: counted from none once the rain or the snow stops, none in winter [skip ci]
The insects were counted all the time the vehicle drove, so a glass turning
to mat_bugs_windscreen after snow or rain (or after winter) showed at once
all it had met meanwhile. Now the count stays at none in winter and while it
rains or snows (the rain or the snow washes them off), and what the blades
left of them before is forgotten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude b5c3a87dc5 Windscreen snow: the layer lists the sprites of each texel, the glass lays them sharp [skip ci]
The layer of the snow held the snow laid together at ~1 mm a texel, so the
glass showed it filtered: softer lumps, flatter normals and refraction than
when every pixel laid the sprites itself. Now water_snowlayer.comp lists, for
each texel, the sprites coming within it (up to 16, in the order they are
laid, the covered ones left out), and mat_snow_windscreen.frag lays only those
at its pixels, sharp from the atlas, as the full look through every cell did.
The layer grows from three to four uint a texel (+8 MiB).

The snow also uses all the tiles of the atlas: mostly the icy fleece of the
first two rows (0-7), now and then a lump of packed snow (10-13) or, more
rarely, a wet one (8, 9); a drop now and then a wet lump with its film (14).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:14 +01:00
Claude cc5bf11373 Windscreen: no drying or melting after the precipitation; the glass clears at once [skip ci]
Reverts e8a0e78 (kept on the branch stan/szyby-schniecie-2026-11-14).
The glass fills with rain only while it rains ("rain:" with precipitation)
and is clear at once when it doesn't: the rain stopped, or the glass holds
snow, so a glass switched from snow to rain starts dry.

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 4d993908f5 Windscreen: rain keeps its last state and dries, snow stays and melts after snowfall [skip ci]
- Rain drops, rivulets and micro droplets run on a rain clock (rain_state.w)
  that only advances while it rains, so they freeze when the rain stops and
  fade as the glass dries.
- Glass wetness fills only during "rain:" weather.
- Snow glasses keep their snow material after snowfall ends (until rain),
  so the snow stays, melts above 0 C into a wet film and drops, and dries.
- The baked snow layer uses a larger drop share while melting.

No new assets; no change to file formats.

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 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
lcddisplay f66d825a04 Windscreen snow: a wiped edge that stays, small gaps, blur, slabs sliding off [skip ci]
- The snow no longer spreads onto its neighbours by itself: the snow
  piled outside the sweep slipped onto the wiped glass whenever the
  blade stopped, and a rim grew along the edge of the wipermask.
- Lumps on thick snow are 12% smaller, so a plastered glass keeps a few
  small gaps.
- The scene behind the snow is blurred as the rain mists the glass: from
  0.05 mm of snow, fully from 0.6 mm, clear again behind a blade.
- Now and then a slab of the snow lets go and slides off the glass,
  wiped or not: each slab from a random depth of snow in its middle
  (0.4 .. 2.5 mm), a slab every 3 s on a glass plastered over, fewer on
  a frozen glass.

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 15ed61f587 Windscreen snow: icier lumps, slower build-up
Lumps stay 60% opaque until the snow is deep and take a faint blue ice
tint. Only 1.5x (was 4x) of the snowfall share reaches the glass, and
the facing gain from speed is capped at 6, so overcast 1.5 plasters
the glass in about ten minutes standing instead of a few.

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 af4f01ec00 Snow windscreen: the tiles of the atlas from the top of its picture
The shader counted the rows of the tiles from v = 0, the bottom of the
picture of the atlas as the texture holds it, while snieg_atlas_maszyna.py
numbers them from the top: every tile drawn was the one of the mirrored
row (the fleece of tiles 2-5 came out as slush, drops and wet lumps, 6-7
as the clumps with stars...), so the glass showed other shapes than the
atlas and its previews. The rows are counted from the top now, of the old
2 x 2 atlas too (its tiles at the places the old snow shader used). 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 62a6a3cf40 Snow windscreen: all icy fleece, packed lumps and drops only now and then
All the grids of lumps are the icy fleece now (the small puffs and icy
clumps of tiles 2-5, the look that was liked), bigger to close the glass
(1.2-3.0 cells, the fleece fills about half its tile), eight of them, by
2-3 mm. A lump of packed snow comes in 3% of the cells of one grid, the
single crystals between the lumps are small puffs instead of dots, and a
drop of a melted flake shows on 5% of the wet texels (35% before). A grid
has a share of its cells having a lump at all. 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 84b38329e3 Snow windscreen: smaller packed lumps, more fleece, more refraction
On the five grids of abc14ed: the lumps of packed snow are smaller (1.2-1.6
cells, 1.9-2.3 before), four grids of them instead of two so they still
close the glass (by 2-3 mm); two grids of the small puffs and icy clumps
(tiles 2-5, the fleece) instead of one of puffs and crumbs; the icy snow
bends the picture as much as a drop, up to 98% opacity (95% before). 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 6f7e0a0bcf Snow windscreen: back to the five grids of lumps that stay (abc14ed)
The look of abc14ed was liked best: the lumps fixed once per cell, five
grids piling up (dots and crumbs, puffs, clumps, two of packed snow). The
shader is that of abc14ed again; 5fb1173 (ten grids of icy clumps over
packed snow) and 4d471f7 (a matte fill instead) are undone. 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 bc33ba3c01 Snow windscreen: a matte fill under the clumps, no pavement of domes
The two grids of packed-snow lumps under the icy clumps showed through as
a grey pavement of round domes (their normals shaded each one). They're
gone; from 2 mm of snow a flat matte layer of the colour of the packed
snow of the atlas (its tile averaged by a coarse mip) fills the gaps under
the clumps, closing the glass by 3 mm with the clumps on it. 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 80bafdc7a5 Snow windscreen: the icy clumps all the way, packed snow only beneath
The grids that close the glass drew the round lumps of packed snow over
the icy clumps (tiles 0-7, the look that was liked). Ten grids now: eight
of dots, icy clumps and crumbs, more and bigger as the snow piles up, and
under them all two of packed snow coming last (2.2-3.4 mm) to fill the
gaps between the clumps; the glass closes by about 3 mm still showing the
clumps. A grid is skipped where the snow of the pixel is far below what
its lumps take. 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 c0589ae696 Snow windscreen: lumps that stay, in five grids that pile up
A cell of the lumps picked its tile, size and whether it was there at all
from the snow of the map every frame: as the snow grew it turned from
crumbs to a clump to a lump of packed snow, and the dots came and went with
the wetness, so what had landed kept changing and the glass never filled.
Each cell has its lump fixed once now (tile, place, turn, size, and the
snow it takes); it comes when the snow around reaches that, grows a little,
and stays until the snow goes. Five grids, shifted, come one after the
other as the snow piles up (dots and crumbs, puffs, clumps, two of packed
snow), each on the ones before, closing the glass by 3 mm; sooner in a
heap. The dots don't depend on the wetness. 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:12 +01:00
lcddisplay cd7fcd03a2 Snow windscreen: the refraction doesn't punch holes into the snow
The bend request of the snow (all of it since the wet look) makes the
post-processing put 85% of the picture from the bent place, up to 96 px
away, in place of the pixel, with the snow drawn in it: an opaque pixel of
snow took the colour of a gap of the snow elsewhere, so the gaps spread
over the cover and it never closed, however much snow lay there. The bend
is scaled down by the opacity of the snow now (none from 95%): the snow
bends the picture only where it lets the light through. 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:12 +01:00
lcddisplay 873937b3a8 Snow windscreen: a front glass at speed gets the snow coming at it
A front glass at speed built up its snow no faster than a standing one:
the flakes come at a glass by the relative wind along its outward normal,
and the outward side of the frames of the map (from the middle of the box
around the cab model) and the air against the cab (from the matrix of the
vehicle and its velocity) don't agree for every cab; with them disagreeing
the glass got the snow of the eddies only (1.5 mm a minute), never closed
between the lumps. The glass takes the snow coming at it along its normal
from either side now (the glass the driver looks through leads); where the
sides agree nothing changes. 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:12 +01:00
lcddisplay 2450612eeb Snow windscreen: wet thick snow closes the glass, flakes stick to snow
- The cover of wet snow (wetness above 0.35, near zero, where the flakes
  land half melted) was drawn with the slush tile, translucent by itself
  (alpha ~0.4), so a glass covered in any amount of it never closed. The
  cover is packed snow once it gets thick (from 0.75 mm, opaque at 2.5 mm),
  greyer when wet by its tone; slush only while it's thin.
- The dry flakes bounced off a moving glass also where snow lay already,
  so the wiped glass (bare, wet from the blade) caught more of them than
  the snow around it. They bounce off a bare glass only now (below
  0.05-0.3 mm of snow); on snow they stick.
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:12 +01:00
lcddisplay 12218fc6d7 Snow windscreen: the map gets all the snowfall, and melts as fast as it can
Two reasons the glass never got plastered:
- the flakes a second the renderer gives (water_snow.x) are a quarter of
  the snowfall (the 0.25 of perground, meant to thin out the particles of
  the drop passes), so the map got a quarter of the snow: a glass not
  facing the motion (standing, side windows) built up 0.4 mm a minute,
  6.5 minutes to opaque. It takes all of it now (x4): 1.5 mm a minute.
- the warm glass melted 0.003 mm of water a second for each degree above
  zero, ~1 kW/m2 a degree, so near zero a standing cab melted the snow
  4-5 times as fast as it came. 0.0002 mm (~70 W/m2 a degree) now.
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:12 +01:00
lcddisplay 092637afa8 Snow windscreen: the snow piles up into an opaque cover
The lumps of a cell only changed their tile and size as the snow grew, and
the cover stayed translucent (at most 90%), so the glass never closed. A
third grid of lumps lies on top of the cover now (it piles up), the cover
sprites are bigger (2.4 cells), and from 0.75 mm the cover thickens to
opaque at 2.5 mm, bending the picture behind less and less. 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:12 +01:00
lcddisplay 9c891272a2 Snow windscreen: the snow stays on a moving glass until it's plastered
At speed the air blew the thin dry snow along and off the glass as fast as
it came, and the glass warmed by the cab melted it near zero, so the glass
never got covered. The air blows only the thinnest powder (below 0.2-0.6 mm,
a quarter as fast), the glass is as warm as the given warmth (not 1.5x) and
the air cools it sooner (/(1 + v/10)), and the lumps close into a cover from
0.25 mm. 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:12 +01:00
lcddisplay 21b3cefaee Snow windscreen: the snow looks wet, refracts, and plasters the glass
All the snow bends the picture behind it now through the post-processing
(the icy lumps at 70% of the bend of a drop), not only the drops and the
slush; the cover lets 10-30% of the light through and the snow glints
more (gloss 0.8), so it looks wet in any frost. The lumps run together
into a cover from 0.35 mm of snow (full by about 1 mm), and more snow
comes to a glass not facing it (the eddies 0.6 m/s), so a standing cab's
glass gets plastered too. 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:12 +01:00
lcddisplay 0d770365ff Snow windscreen: the lumps close into a cover
Too much clear glass stayed between the lumps. They're in two grids now,
the second shifted by half a cell, so they overlap; a cell surely has a
lump from 0.5 mm of snow (fewer below), the lumps are bigger, and they run
together into a cover of packed snow from 0.7 mm (full from 2.1 mm), so the
glass gets plastered. 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:12 +01:00
lcddisplay c5adb1db9b Snow windscreen: the same snow on the wiped glass as around it in frost
A blade left a wet trace on any glass, and the snow landing on it there
counted as wet: lumps of slush in the sweep, icy clumps around it. The
trace is left only on a glass above zero now (none below -1 deg C, full
from +1), and the water on a glass below zero freezes into packed snow
(0.02 mm a second, from -2 deg C fully). 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:12 +01:00
lcddisplay 7e7ca904c0 Snow windscreen: icy clumps of grains instead of star crystals, more of them
The tiles of star crystals (single and in flakes, also around the clumps)
are gone from the atlas: every dry tile is now an icy clump of grains, as
the crumbs - a dot, a few grains, small and bigger clumps. Many more of
them (35% of the 7 mm cells holding a little dry snow), the lumps cover the
glass from 1.2 mm of snow (fully by 3.5 mm), and fewer dry flakes bounce
off a moving glass (40% from 25 m/s), so the snow can plaster the glass.

The atlas (snieg_atlas_maszyna.py) changes its tiles 0-5 and 10, 11. To be
added to the SVN: textures/fx/snow-atlas.tga and
textures/fx/snow_normalmap.tga.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:12 +01:00
lcddisplay d8643c42a1 Snow windscreen: sizes in metres of the glass, lumps in heaps
The sprites were sized in texels of the map, and a glass taking only a part
of its uv has big texels: crystals of a few cm (the big stars at speed),
lumps in a coarse even grid. The crystals and drops are in cells of 6 mm of
the glass now, the lumps in cells of 16 mm, from the size of the glass in
the frames of its map. The lumps come in heaps (a random number every four
cells, blended): likelier and bigger there, barer glass between; they sit
anywhere in their cell. Single crystals are needles, plates, rarely a star.
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:12 +01:00
lcddisplay 2c23d12070 Snow windscreen: no big star flakes, dry powder bounces off a moving glass
The small lumps of dry snow were drawn with the tiles of a few star
crystals, a glass covered in big stars at speed. They're crumbs now (a
flake breaks up hitting the glass); single crystals are rarer (5% of the
texels) and smaller (~5 mm). Dry flakes (below -3 deg C, on dry glass)
bounce off a moving glass: 85% of them from 25 m/s, so dry snow builds up
slowly at speed; the wet ones stay. 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:11 +01:00
lcddisplay 9c2f857210 Snow windscreen: lumps in cells as the drops of the rain, not a sprite per texel
A sprite on every texel holding snow covered the glass in an even pattern
of dots. The snow is drawn now as the rain is: a lump in a cell of four
texels at most, the more snow around the likelier and bigger, sizes from a
few mm to a few cm (most small, wet ones bigger), clear glass between them
until the snow gets thick and packed snow covers it. Single crystals of dry
snow show on 12% of the texels holding a little of it, drops of melted
flakes on some of those holding only water. The haze stays near the snow.

The atlas (snieg_atlas_maszyna.py) gets bigger wet lumps with a bigger
frosted core. To be added to the SVN: textures/fx/snow-atlas.tga and
textures/fx/snow_normalmap.tga.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-29 11:39:11 +01:00