Smooth overlay does not blend across region borders

#607 · open · 0 comments

View on GitHub ↗

Matej-Hajek

With *Smooth overlays* enabled, the overlay fades smoothly from chunk to chunk inside a region, but on region borders it cuts hard. You get a grid of sharp seams over the whole map. **Steps to reproduce the behavior:** 1. Import a world 1. Enable *Smooth overlays* 1. Enable an overlay 1. Observe region borders in pleces where each side of the border has a different value displayed. **Expected behavior:** The overlay blends smoothly across tegion borders, not just within a single region. <img width="486" height="240" alt="Bug preview, before fix (left) and after fix (right)" src="https://github.com/user-attachments/assets/e9e589e8-03cf-4295-bdb5-a46c1cb11dfa" /> **Cause:** > Claude wrote this paragraph `OverlayPool.parseColorGrades()` builds one 32x32 `WritableImage` per region, and `TileImage.draw()` scales it up over the tile with `ctx.setImageSmoothing(...)`. Bilinear filtering has nothing to sample past the edge of an image, so it clamps to the outermost texel. Each tile is its own texture, so the outer half chunk is flat and two adjacent tiles never blend into each other. Nothing is wrong with the values, it's purely how the images are drawn. **Fix:** > Claude generated this fix and it seems to work * https://github.com/Matej-Hajek/mcaselector/tree/fix/overlay-region-border-seam (2 commits, 4 files, +175/-37) **Environment:** * OS: Linux Mint 22.3 * Java version: 21.0.11 * Version of MCA Selector: 2.8

Comments