ReviewOS

stacks/the-settlers-iii-remake

Anchor continuous terrain textures to the reference land-grid coordinates

#217
Closed chris opened this 7 days ago ·
7 days ago

The browser currently repeats terrain textures in elevated projected coordinates. The supplied reference assigns continuous texture coordinates to grid vertices and interpolates them across the projected face. This changes both the vertical texture frequency and the phase on raised terrain.

At the pinned Background.java, ETextureOrientation.java and DrawConstants.java, the continuous grid coordinates are u = 16*x - 8*y + 8, v = 16*y. The actual geometry is screenX = 16*x - 8*y, screenY = 9*y - 2*height. Texture coordinates must stay tied to the same land when height changes.

Source owner: resources/game/renderer.ts and resources/game/terrain-materials.ts in this repository. Parent #88. Preserve the coverage correction in #215 and cache bounds from #216.

Acceptance:

  • Retain a failing production renderer regression with distinct authored source texels that demonstrates the current frequency or height-phase mismatch.
  • Use the reference continuous coordinates and interpolate over the actual projected triangle, including unequal heights, opposite windings, clipping and folded or collapsed faces.
  • Preserve exact source texels, shared-edge coverage, face order, fog behavior, bounded allocations and disposal.
  • Verify flat and elevated scenes with all four currently imported terrain materials, negative coordinates, chunk junctions, camera offsets and zooms.
  • Verify actual 1x and 2x browser contexts and screenshot dimensions through the installed maintained driver. Check exact independent source candidates at nearest boundaries without RGB tolerance or skipped pixels.
  • Preserve simulation checksums and save/replay behavior. Run lint, types, relevant units, asset verification, production build and the complete production browser gate. Retain evidence for the pushed version before closing.

Implement this as one presentation correction. Full landscape transition selection, raw landscape identity, reference vertex lighting and native graphics remain separate work under #88. The pinned remake is implementation evidence, not an observation of the original Gold executable. Keep original raster evidence private under the existing publication policy.

7 days ago

The continuous texture correction is in main. Terrain UVs now follow the reference land grid and interpolate across the actual elevated faces. Raising the same land no longer changes its texture phase. The source texels, opaque mesh coverage, face order and bounded caches are preserved.

The retained regression failed before the fix in both flat and raised scenes. It now passes 120,339 pixel checks per actual 1x and 2x context, with independent native Canvas checks for all four imported terrain materials, unequal heights, folded and collapsed faces, camera movement and chunk junctions. Lint, types, all 395 unit tests, original-asset verification and the production build passed. Normal tutorial Save and Load restored the checkpoint too.

The complete local browser suite and production CI are running. This issue remains open until those reports are qualified. Reference lighting and landscape transitions remain broader #88 work.

7 days ago

The complete local production browser gate has now passed all 16 suites and 510 steps, with no console, request or collection errors. The rival battle ran for over ten real minutes and retained its observations and save/reload result. The expanded terrain checks passed at actual 1x and 2x, with 120,339 pixel checks per scale.

CI for the published version has passed lint, types, original-asset import and verification, unit tests and the production build. Its browser gate is still running, so this issue remains open pending that result and diagnostic verification. The separate lighting defect is tracked in #218.

7 days ago

The continuous texture correction has passed production CI. All 16 browser suites and 510 steps passed, with no console, request or collection errors. The full ten minute rival battle, save/reload behavior and actual 1x/2x terrain checks are qualified. Each scale passed 120,339 pixel checks.

The original retained diagnostic archive matches GitHub's digest and passes every CRC check. Lint, types, all 395 unit tests, original assets and the production build passed too. Closing this correction.

Terrain textures now keep the reference grid frequency and phase across elevation changes. Per-vertex lighting is tracked in #218; full landscape transitions, original Gold observations and native presentation remain open under #88.

Sign in to comment on this issue.