fix: dark pixels in water texture + update README

Wasser-Tile hatte 2 dunkle Pixel: ein LEAVES-2x2-Block (Seed 333, Offset 15)
blutete 1px ueber die Tile-Grenze in die erste Wasser-Spalte. Fix: Dekor-
Offsets (LEAVES 2x2, STONE-Adern 2x1) auf TILE_PX-size begrenzen, so dass
keine Bloecke mehr ins Nachbar-Tile bluten. Verifiziert: 0 blutende Bloecke.

README: Steuerung aktualisiert (Shift = Sprint/Runter statt Ctrl) sowie
neue Grafik-Features (Schatten, baked AO, Post-Processing) und config.js
ergaenzt.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
minecraft-cloneandClaude committed 2026-06-21 01:11:31 +02:00
1 parent c27c61e070
commit a748724dfb
2 files changed
+19 -4

No files matched your search

+9 -2
View File
@@ -43,7 +43,10 @@ export function buildAtlasTexture() {
const rStone = mulberry32(7);
for (let i = 0; i < 10; i++) {
ctx.fillStyle = `rgb(${clamp(90 + (rStone() - .5) * 20)},${clamp(90 + (rStone() - .5) * 20)},${clamp(94 + (rStone() - .5) * 20)})`;
ctx.fillRect(p.ox + ((rStone() * TILE_PX) | 0), p.oy + ((rStone() * TILE_PX) | 0), 2, 1);
// 2px breite Adern: x auf TILE_PX-2 begrenzen, damit sie nicht ins Nachbar-Tile bluten.
const sx = Math.min((rStone() * TILE_PX) | 0, TILE_PX - 2);
const sy = (rStone() * TILE_PX) | 0;
ctx.fillRect(p.ox + sx, p.oy + sy, 2, 1);
}
// --- SAND ---
@@ -99,7 +102,11 @@ export function buildAtlasTexture() {
const d = (rLeaf() - 0.5) * 40;
const c = shade([44, 100, 30], d);
ctx.fillStyle = `rgb(${c[0]},${c[1]},${c[2]})`;
ctx.fillRect(p.ox + ((rLeaf() * TILE_PX) | 0), p.oy + ((rLeaf() * TILE_PX) | 0), 2, 2);
// 2x2-Bloecke: Offset auf TILE_PX-2 begrenzen, damit sie nicht ins Nachbar-Tile
// bluten (ein Blatt-Block hatte Offset 15 und erzeugte 2 dunkle Pixel im Wasser).
const lx = Math.min((rLeaf() * TILE_PX) | 0, TILE_PX - 2);
const ly = Math.min((rLeaf() * TILE_PX) | 0, TILE_PX - 2);
ctx.fillRect(p.ox + lx, p.oy + ly, 2, 2);
}
// --- WATER (halbtransparent) ---