TilemapGPULayer render issue causing lines between tiles

Aperta
#7,317 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
javascript

Direzione di ricerca

Inizia dal CodePen collegato e riproduci l’artefatto in TilemapGPULayer usando i tileset forniti, confrontandolo con un layer normale. Verifica l’effetto di mipmapFilter: "LINEAR_MIPMAP_LINEAR" e le varianti di margin, spacing e texture-size. Il lavoro è completo quando il GPU layer esegue il rendering senza linee tra i tile nelle configurazioni segnalate, oppure quando la configurazione che non funziona e la causa sono documentate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Version

  • Phaser Version: 4.1
  • Operating system: W11

Description

I have a hard time rendering a tilemap correctly utilizing a TilemapGPULayer. No matter if I try to use an adjusted tileset that makes use of extruded tile borders or not, there are issues rendering the layer. using a normal layer works normally.

My findings:

  • having mipmapFilter: "LINEAR_MIPMAP_LINEAR" in the game config breaks stuff (hello old friend, i missed having issues caused by you)
  • having a tilemap gpu layer instead of a normal layer breaks stuff in bubbits for me in any case, even without that mipmapFilter
  • going for 4096x4096 texture size for the tileset (as advised) makes it very difficult to have margin and spacing that perfectly fits tile count and those target dimensions. (maybe you can math how to do it correctly) but did not lead to less lines showing for me ingame when i just forced correct dimensions via image canvas size (did lead to phaser warning of not fitting number of tiles)

Example Test Code

Maybe this codepen is a good starting point to get down to these render issues, it shows different kinds of tilemaps, both normal and gpu using both, sets with and without margin and spacing.

https://codepen.io/SaintFlow/pen/vEgyVZa

Image
Lingua principale
JavaScript
Stelle
40.7k
Fork
7.2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phaserjs/phaser

Tutte le issue di phaserjs/phaser

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.