Pull nearest tilemap uvs a tenth of a texel in, 0.02 still showed lines
At 0.02 texel the lines between tiles of a nearest tilemap were gone at the zooms tried first, but still showed at others. The user raised the inset to 0.1 by hand and checked it in the browser. - A tenth of a texel is still far below half a texel, so the texel picked at every pixel centre stays the same. - The comment names the new value. Tests: - tilemap.test.ts follows the value: the inset test expects 0.1/96, the sliver test allows up to 0.25 texel from the edge, and the quad test checks its uvs to 2 digits instead of 3. - ./check.sh: 156 files, 2314 tests, CHECK EXIT 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bf1ee7a4e
commit
2592873d76
2 files changed
+8
-8
No files matched your search
@@ -54,8 +54,8 @@ export function tileMesh(
|
||||
const half = tile / 2;
|
||||
// Linear sampling needs half a texel so the blend never reaches the neighbour. Nearest needs only
|
||||
// a sliver: at odd zooms a pixel centre on the quad edge can round onto the neighbour's first
|
||||
// texel and draw a line. 1/50 texel keeps every picked texel the same.
|
||||
const inset = sheet.smooth ? 0.5 : 0.02;
|
||||
// texel and draw a line. 1/10 texel keeps every picked texel the same.
|
||||
const inset = sheet.smooth ? 0.5 : 0.1;
|
||||
const insetX = inset / sheet.textureWidth;
|
||||
const insetY = inset / sheet.textureHeight;
|
||||
let v = 0;
|
||||
|
||||
Reference in new issue
Block a user