18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 00:22:42 +01:00
Commit Graph

4126 Commits

Author SHA1 Message Date
Claude e8a0e78677 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-14 23:14:37 +01:00
lcddisplay 10b723106e 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-14 22:14:18 +01:00
lcddisplay f9787e7062 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-14 20:41:21 +01:00
lcddisplay a7c48e542c Merge feat/windscreen-snow-map (the snow on the windscreen as tested today) [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-13 20:55:10 +01:00
lcddisplay 5c6237f6c2 Merge feat/vat-people (VAT people, moths, deer, windscreen water and snow, optimisations) into feat/gl46-migration [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-13 20:54:57 +01:00
lcddisplay b1236e4216 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-13 20:54:42 +01:00
lcddisplay 513aaeef52 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-12 13:01:13 +01:00
lcddisplay 88a89c10a9 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-12 12:47:38 +01:00
lcddisplay 2ea198ee81 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-12 12:39:16 +01:00
lcddisplay 41be5291bb 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-11 21:54:21 +01:00
lcddisplay e7670732a3 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-11 21:45:44 +01:00
lcddisplay 4d471f7d84 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-11 21:41:52 +01:00
lcddisplay 5fb1173357 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-11 21:36:21 +01:00
lcddisplay abc14ed7e3 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-11 21:25:48 +01:00
lcddisplay 7363052c81 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-11 21:09:53 +01:00
lcddisplay f4c93564db 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-11 21:01:37 +01:00
lcddisplay 169aeadf49 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-11 20:54:48 +01:00
lcddisplay 0bd5e1b680 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-11 20:42:25 +01:00
lcddisplay 325f87a9f6 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-11 20:31:49 +01:00
lcddisplay 376ccca1eb 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-11 20:26:11 +01:00
lcddisplay c184185635 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-11 20:19:12 +01:00
lcddisplay c8cb3871b5 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-11 20:11:55 +01:00
lcddisplay 39b78b93ed 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-11 20:06:54 +01:00
lcddisplay 26512f47dc 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-11 20:03:19 +01:00
lcddisplay 39d4a41c07 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-11 19:53:12 +01:00
lcddisplay 331b480d48 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-11 19:44:34 +01:00
lcddisplay 02420c32d7 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-11 19:38:01 +01:00
lcddisplay 720bc515ff Snow windscreen: the blades wipe the snow as the rain, wet snow refracts
The blades no longer push the snow along into ridges: they take what they
go over (a little stays, a wet trace), as they wipe the rain. Near zero the
flakes land wet, half of them water, and the glass is warmer (the given
warmth x1.5, cooled less by the speed), so the snow turns into lumps of
slush sooner. The wet lumps and the slush of the atlas bend the picture
behind them through the post-processing, as the drops do.

The atlas (snieg_atlas_maszyna.py) changes its tiles 8, 9 and 14: grey
translucent lumps with a frosted core, a darker rim and a dome for the
refraction. 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-11 19:22:11 +01:00
lcddisplay f8c0c4e877 Snow windscreen: the snow drawn only with sprites of the atlas
The procedural snow (cells with timers, the clumping field, the noise of the
layer and its edge, the wiper mask read in the shader) is gone: what lies on
the glass comes from the map of the simulation, and it's drawn with sprites
of the atlas in two layers, as the drops of the rain and the bugs:
- a flake on every texel holding snow (crystals, flakes of a few of them,
  crumbs; wet lumps; a drop where only the water is left, bending the
  picture behind), the more snow the bigger;
- under them a bigger sprite every three texels where the snow is thicker
  (clumps, packed snow, slush), overlapping into a cover.
A glass without a map (no simulation) has no snow.

Uses a new 4 x 4 atlas (2048 x 2048, snieg_atlas_maszyna.py):
textures/fx/snow-atlas.tga and textures/fx/snow_normalmap.tga, replacing the
2 x 2 ones of the same names. Without them (a 1024 atlas) the shader takes
the four old tiles for the sixteen. To be added to the SVN: the two files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-11 19:10:26 +01:00
lcddisplay 63e959fe66 Deer: the ground of the heightmap terrain counts
On a scenery with heightmap terrain (Tomaszewo: terrain/tomaszewo_hgtmap/)
the deer looked for the ground among the shapes of the scenery only, found
none beside the track and weren't put anywhere ("no ground at 3.0 m" in the
log). Now the height of the heightmap terrain counts as the ground too, and
its bodies of water as water. The chunk under the point is read from its
pack file when it isn't in memory: the deer are put about 2 km ahead of the
camera, where the terrain isn't loaded for drawing yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 15:27:51 +01:00
lcddisplay 2f4894cb68 Deer: log why a deer wasn't put at a place
Every attempt that fails says why in the log: a switch, a crossing of roads
or the end of the track ahead; the platform found (its model, or the raised
terrain beside the track); or, for each side, why the way to run away isn't
flat ground: no ground found, water, ground too low or high, a step, or too
much rise and fall. For finding out why no deer appear on a scenery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 14:38:36 +01:00
lcddisplay b035391488 Deer: keep away from long platforms too, and log where each is put
A platform model is placed by its middle, so a deer by the end of a long one
(peronowe/1k96w400m: 200 m from the middle) was farther than the 150 m looked
at, and was put there. Now a deer is kept 100 m beyond the reach of the model
(its bounding radius), the instances looked through up to 350 m away. Any
model with peron in its path counts (peronowe/..., przytorowe/tszopaperon).

The log tells where each deer was put ("Deer put at x y z").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 13:43:40 +01:00
lcddisplay fe623778ee Deer: on curved track too, only the switches keep them away
The track at the place no longer has to be straight: a curve is fine. Only a
switch (or a crossing of roads) from the train to 100 m past the place keeps
a deer from being put there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 13:01:53 +01:00
lcddisplay 77117d5f5d Deer: look at the train, only on plain straight track, not by platforms
The flight now has 6 clips instead of 2: the head turned 50, 80 or 110
degrees to the left or to the right. The game picks the one nearest to the
angle between the heading of the deer and the train. Before, clip 0 didn't
turn the head at all and clip 1 always turned it to the left, so the deer
looked away from a train on its right.

A deer is put only where the way from the train to 100 m past the place is
plain track: a switch (or a crossing of roads) on it fails, since the route
may change before the train gets there. The track there also turns at most
3 degrees over 50 m before and after the place.

No deer within 150 m of an instance of a platform model (a folder named
peron..., as peronowe/), nor where the terrain 2.5 or 4 m beside the track
rises 0.45 m over the sleepers (a platform made of terrain).

Assets: animals/jelen_skok.t3d and its VAT textures (jelen_skok_vatpos_hi,
_vatpos_lo, _vatnormal) have to be the ones baked with the 6 clips, in the
order 50, 80, 110, -50, -80, -110 degrees (jelen_anim2.py LOOKS). The deer
animations are kept local for now, not in the SVN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 12:59:14 +01:00
lcddisplay 849f8cf55a Deer only where there's flat ground to bound away over
A deer is put beside the track only where the way it runs away is all over the
terrain of the scenery: ground found under each of the 9 samples of its way,
none of them water (a material named water/woda/wody), no farther than 1.2 m
below or 0.8 m above the sleepers, rising or falling at most 0.45 m between
samples and 1.2 m all along. So no deer on an embankment, in a cutting or by a
river. The side it runs to is picked at random first, then the other one; with
neither flat, the next deer is looked for 200 m on instead of a whole interval.
The ground is sampled when the deer is put there, so the run uses the same
heights. Translucent shapes count as ground too, for water drawn translucent.

Terrain made of models (e3d tiles) gives no ground, so there are no deer there.
No asset changes needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-11 11:16:56 +01:00
lcddisplay e8cc10d97f Merge feat/windscreen-snow-map into feat/vat-people: the deer together with today's rain and snow windscreens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-10 23:17:56 +01:00
lcddisplay d9970b5dec Deer at the tracks: graze ahead of the train, take fright at the horn and bound away
A deer is put on the path the player's train goes along (world/deer.cpp), grazing. The horn
within deer.hornrange, or the train closer than deer.fleedistance, frightens it: it raises its
head, looks at the train and bounds away from the tracks, then grazes where it stopped. The deer
go once the train is past them; they aren't parts of the scenery (not saved, not edited).

Off unless eu07.ini turns it on: deer (no), deer.interval (2000 m), deer.distance (2000 m),
deer.chance (1), deer.hornrange (600 m), deer.fleedistance (150 m).

- mat_vat.vert (ogl46, vk14): vat_random -1, the game picks the clip and the moment of an instance
  by the fraction of ten times its turn about the vertical, so one animation hands over to the
  next in the very same pose. 0 and 1 work as before.
- TAnimModel::draw_alone(): an instance the game moves leaves the groups of its model.
- scene_walk::Queue_Model: the record of an instance drawn on its own is made anew when the
  instance moved.

Assets (game data, installed locally in the game folder, not yet in the SVN; without them no deer
is made):
- models/animals/jelen_je.t3d, jelen_zryw.t3d, jelen_skok.t3d (the deer of jelen_lewo.t3d with the
  head turned straight, three animations baked by jelen_anim2.py)
- textures/animals/jelen_{je,zryw,skok}.mat and their _vatpos_hi, _vatpos_lo, _vatnormal .tga;
  diffuse animals/sarna_d_1, in winter animals/sarna_f_1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXgG7F4L42c2F9sDSAJbT2
2026-11-10 22:44:22 +01:00
lcddisplay 84bdde9bba Snow windscreen: thin flakes let the light through
A single flake was drawn nearly opaque and lit only from the cab, a dark
speck against the lit snow outside at night. A thin flake is 45% opaque now
(full from 2.5 mm of snow) and the picture behind it is blurred, as through
ice crystals. No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 21:48:28 +01:00
lcddisplay bfa361ab59 Snow windscreen: the snow a blade pushes is counted once
A texel ahead of a blade took the lines of every neighbour pointing at it,
and the lines overlapped, so the snow pushed along grew at every step and
the ends of the sweeps filled with ridges even on a glass with hardly any
snow. A texel in the sweep takes only the line behind itself along the way
of the blade, one off the sweep the line of one neighbour. No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 21:42:57 +01:00
lcddisplay b5f7244079 Snow windscreen: the snow a blade pushes doesn't slip behind it
The snow piled in front of a blade slipped onto its lower neighbours, the
texels the blade had just wiped among them, so it left a stripe of snow on
the wiped glass at every step. Piled snow slips only where no working blade
goes over. No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 21:38:19 +01:00
lcddisplay f67b9ae2da Snow windscreen: a blade leaves the glass clear, not streaks of the snow it pushes
A blade going over the texel holding the snow it pushes left 3% of all of it
there, a stripe of snow for every texel of its way; it leaves 3% of the snow
up to 0.03 mm now, and a wet trace of at most 0.015 mm. A thin film of water
dries and runs off in a few seconds, the water spots are fewer, the haze
needs more snow, the packed snow is whiter. No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 21:33:23 +01:00
lcddisplay 6bc9a5556e Snow windscreen: the snow of the glass simulated on a map that keeps it
A glass of mat_snow_windscreen (the material of the "snow:" block, with a
mask of the wipers) gets a slot of the windscreen water storage, as the
glasses of the water could, and two maps of its snow (a step reads one,
writes the other): the snow, the water, how packed the snow is and the shape
of its flakes for each of 256 x 256 texels of its uv. water_snow.comp runs a
step a frame, both APIs:
- the flakes land as many as come to the glass facing the snow against the
  cab (and a few from the eddies), the dry ones bouncing off at speed;
- the blades take the snow they go over (a little stays, a wet trace) and
  push it ahead of themselves, leaving it as ridges at the ends of their
  sweeps; piled snow slips onto its neighbours into a wedge;
- the glass is warmer than the air (the cab is heated, less so at speed):
  above zero the snow melts into water, slush slides down, dry powder is
  blown along by the air at speed, the water runs and dries.
mat_snow_windscreen.frag draws the map: flakes from the atlas where the snow
is thin (water spots where it melted), a layer with a torn edge, as opaque as
it is thick, grey when wet, its relief from the slopes of the map; the wet
glass bends the picture behind through the post-processing. Without the
simulation the glass is drawn as before.

The glasses are found again when a material of the cab changes its kind
(the weather switched its shader). The drop passes run only for glasses of
the water. No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 20:51:47 +01:00
lcddisplay a1cf4f7452 Rain windscreen: fewer drops left by a blade (wiper_miss 0.005)
No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 20:40:38 +01:00
Claude 6b9460373d Windscreens: a third of the drops left by a blade, and the snow glass through the post-processing
- rain_cells.glsl: wiper_miss 0.05 -> 0.0167, a blade leaves three times fewer drops where they were
- mat_snow_windscreen.frag (the snow glass, made for the game apart from this repository) added, asking
  the post-processing for its haze and its bent picture through the velocity target as the rain and
  the insects of this version do (rain_windscreen_haze.glsl)

No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 18:57:29 +01:00
Claude ab65e73f29 Vulkan: define WIPER_PASS_BUCKETS for the shaders
The preamble of the vulkan renderer didn't define it, and with the constants of common.glsl skipped
(MASZYNA_CONSTANTS) the shaders didn't compile: the renderer failed to start and fell back to
opengl. Now defined by the preamble, and common.glsl defines it when the renderer doesn't (an older
exe with these shaders).

No assets change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BqfRrTiBDaAyQ2gT6ZrnZD
2026-11-10 18:55:01 +01:00
Claude 33442de40c 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-10 18:55:01 +01:00
Hirek 19fba58976 Another fix 2026-11-10 17:37:10 +01:00
Hirek 9d20c9ac61 fixes 2026-11-10 17:09:19 +01:00
Hirek 8701c5de02 Merge branch 'master' into feat/renderers-cleanup 2026-11-10 17:09:09 +01:00
Hirek ee6f9a0aa2 Merge branch 'master' of https://github.com/MaSzyna-EU07/maszyna into feat/wasm-screens 2026-11-10 16:23:35 +01:00