Ground reads as square blocks inside a biome (blend the 4 variants like borders) #201

Closed
opened 2026-07-24 21:38:46 +02:00 by panda · 1 comment
Collaborator

Reported from the client: inside a single biome the ground still reads as square blocks in places.

Diagnosis

Each biome ships 4 ground variants and GroundTileSelector picks one per cell deterministically (hash of x,y, plus a horizontal flip). That kills the "one repeating tile" look, but each variant is still drawn as a full diamond: where two different variants meet, the seam is a hard diamond edge. Over a large uniform region those edges line up into visible rectangular patches.

The border case was already solved for biome-to-biome transitions in #162 by the dual-grid corner masks. The same idea is not applied within a biome, between its own variants.

Proposal

Apply the dual-grid treatment one level down: treat the per-cell variant index as the thing being blended, so a cell draws its base variant and masks the neighbouring variants in at the corners, exactly as biomes do today. The masks already exist (mask/dualgrid_00..15), so this is renderer work rather than new art.

Watch out for:

  • Cost — this multiplies the ground draw calls; measure before/after, especially with the world now at 256x192.
  • Determinism — the variant pick must stay a pure function of (x, y) so every client draws the same ground; the blend must not introduce per-frame or per-client variation.
  • Display-only — variants must remain purely cosmetic: walkability and sight still come from the terrain flags, never from which variant was drawn.

Definition of Done (delta)

  • A large single-biome area shows no rectangular banding at 1:1 zoom (before/after screenshots).
  • The variant choice remains deterministic from (x, y) — two clients render the same ground.
  • Ground draw cost is measured and reported; a regression is called out rather than absorbed silently.

Related: #162 (dual-grid borders), #137 (biome art, 4 variants per biome).

Reported from the client: inside a single biome the ground still reads as **square blocks** in places. ## Diagnosis Each biome ships **4 ground variants** and `GroundTileSelector` picks one per cell deterministically (hash of x,y, plus a horizontal flip). That kills the "one repeating tile" look, but each variant is still drawn as a **full diamond**: where two different variants meet, the seam is a hard diamond edge. Over a large uniform region those edges line up into visible rectangular patches. The border case was already solved for *biome-to-biome* transitions in #162 by the dual-grid corner masks. The same idea is not applied *within* a biome, between its own variants. ## Proposal Apply the dual-grid treatment one level down: treat the per-cell **variant index** as the thing being blended, so a cell draws its base variant and masks the neighbouring variants in at the corners, exactly as biomes do today. The masks already exist (`mask/dualgrid_00..15`), so this is renderer work rather than new art. Watch out for: - **Cost** — this multiplies the ground draw calls; measure before/after, especially with the world now at 256x192. - **Determinism** — the variant pick must stay a pure function of (x, y) so every client draws the same ground; the blend must not introduce per-frame or per-client variation. - **Display-only** — variants must remain purely cosmetic: walkability and sight still come from the terrain flags, never from which variant was drawn. ## Definition of Done (delta) - A large single-biome area shows no rectangular banding at 1:1 zoom (before/after screenshots). - The variant choice remains deterministic from (x, y) — two clients render the same ground. - Ground draw cost is measured and reported; a regression is called out rather than absorbed silently. Related: #162 (dual-grid borders), #137 (biome art, 4 variants per biome).
Owner

Risolta da PR #202 (dc0b132): il banding a diamanti quadrati dentro un bioma è stato eliminato applicando il blend dual-grid anche fra le 4 varianti di ground (non solo fra biomi). Chiudo — completata.

Risolta da **PR #202** (`dc0b132`): il banding a diamanti quadrati dentro un bioma è stato eliminato applicando il blend dual-grid anche fra le 4 varianti di ground (non solo fra biomi). Chiudo — completata.
marco closed this issue 2026-07-25 19:06:15 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#201
No description provided.