mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 19:09:25 +02:00
Tiles drawn at the same level met exactly, but a finer tile beside a coarser one has samples on their shared edge that the coarser one skips, and the ground between them could open up. This closes the gap the standard way (CDLOD): each vertex slides towards the next coarser level as its distance nears the end of its level's range, so that by the end of the band a tile is, vertex for vertex, the coarser tile beyond it. Levels also stop popping when they change. The mip chain is point sampled, so the next level's grid is this level's even samples. An odd vertex slides onto its even neighbour and takes its height, and the grid, whose diagonals all run the same way at every level, collapses exactly into the coarser triangulation. No second texture and no neighbour information is needed; the morph is computed per vertex from its distance to the camera, the same distance the level is chosen by. Two things the geometry demands, both settled by tools/terraincook/seamcheck.py, which walks random camera positions over 128 m, 256 m and 12.8 km tiles and counts every edge vertex where the finer side has not finished morphing or the coarser side has started: - the band ends a rescan's worth of travel (a quarter tile) short of the level's range. Levels are chosen where the camera stood at the last rescan, the morph follows it every frame, and a band ending at the range itself left gaps at every level boundary; - the band is a fifth of the range wide, and level ranges are counted in tiles (four for the finest level) rather than fixed metres, which keeps the coarser tile's band clear of any edge a finer tile reaches, whatever the tile size. The script finds no gap with these values. In the game on baltyk, a low view differs from the unmorphed shader only in a strip of distant ground at the horizon, and nearer than the first band the picture is identical. The cooker's comment claimed tile seams were identical at every level; that held only for neighbours at the same level, and now says so.