Smooth biome-border transitions (world-space blend shader) #162

Closed
opened 2026-07-23 13:13:49 +02:00 by panda · 1 comment
Collaborator

Follow-up to the biome-border transitions in #155 (commit 1fe7433).

The current transitions bake per-tile noise overlays (a biome's tile feathered from each iso edge,
4 noise variants picked per cell). This softens borders but leaves a residual diamond/"squares"
artifact
: the noise is baked per-tile (reused on every cell), so it is NOT continuous across the
world, and the transition is confined to a single diamond on the lower-priority side.

An offline prototype confirmed the fix: evaluating the noise in world space (continuous across
cells) gives a genuinely smooth, organic border — which a baked-per-tile overlay cannot do.

Goal

Smooth, continuous biome-border transitions (no visible tile grid at borders), commercial-quality.

Approach (proposed)

A blend shader (MonoGame DesktopGL Effect, cross-platform OpenGL): sample the two neighbouring
biome textures and mix them with a world-space noise-perturbed threshold, per pixel. No extra art.
Requires adding a compiled shader to the client render pipeline (the project currently avoids the
content pipeline — load a precompiled .mgfxo via new Effect(gd, bytes)).

Alternative (owner's option): dedicated authored transition tiles/masks per biome pair — rejected as
first choice (N² combinations), but the owner may supply targeted masks to repair specific borders.

Definition of Done (player-observable)

  • Walking across any biome border, the ground reads as a continuous, organic transition — no
    diamond/"squares" stair-step at the seam.
  • Still derived from the biomes' own art (no per-biome-pair art required for the shader path).
  • Cross-platform (Win + macOS DesktopGL).
Follow-up to the biome-border transitions in #155 (commit 1fe7433). The current transitions bake **per-tile noise overlays** (a biome's tile feathered from each iso edge, 4 noise variants picked per cell). This softens borders but leaves a **residual diamond/"squares" artifact**: the noise is baked per-tile (reused on every cell), so it is NOT continuous across the world, and the transition is confined to a single diamond on the lower-priority side. An offline prototype confirmed the fix: evaluating the noise in **world space** (continuous across cells) gives a genuinely smooth, organic border — which a baked-per-tile overlay cannot do. ## Goal Smooth, continuous biome-border transitions (no visible tile grid at borders), commercial-quality. ## Approach (proposed) A **blend shader** (MonoGame DesktopGL `Effect`, cross-platform OpenGL): sample the two neighbouring biome textures and mix them with a world-space noise-perturbed threshold, per pixel. No extra art. Requires adding a compiled shader to the client render pipeline (the project currently avoids the content pipeline — load a precompiled `.mgfxo` via `new Effect(gd, bytes)`). Alternative (owner's option): dedicated authored transition tiles/masks per biome pair — rejected as first choice (N² combinations), but the owner may supply targeted masks to repair specific borders. ## Definition of Done (player-observable) - Walking across any biome border, the ground reads as a **continuous, organic transition** — no diamond/"squares" stair-step at the seam. - Still derived from the biomes' own art (no per-biome-pair art required for the shader path). - Cross-platform (Win + macOS DesktopGL).
Owner

Chiudo come superseded. I seam di bordo fra biomi sono stati risolti con le mask binarie dual-grid in PR #202 (dc0b132, #200/#201) — approccio che #167 stesso indica come sostituto dello splatting/blend-shader. Nessuno shader .mgfxo è stato aggiunto alla pipeline e i bordi ora sono puliti, quindi il blend shader world-space non serve più. Riaprire solo se un bordo specifico resta insoddisfacente.

Chiudo come **superseded**. I seam di bordo fra biomi sono stati risolti con le **mask binarie dual-grid** in **PR #202** (`dc0b132`, #200/#201) — approccio che #167 stesso indica come sostituto dello splatting/blend-shader. Nessuno shader `.mgfxo` è stato aggiunto alla pipeline e i bordi ora sono puliti, quindi il blend shader world-space non serve più. Riaprire solo se un bordo specifico resta insoddisfacente.
marco closed this issue 2026-07-25 19:06:22 +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#162
No description provided.