TilemapGPULayer render issue causing lines between tiles

オープン
#7,317 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
javascript

調査の方向性

リンクされたCodePenから始め、提供されたタイルセットを使ってTilemapGPULayerでアーティファクトを再現し、通常のレイヤーと比較します。mipmapFilter: "LINEAR_MIPMAP_LINEAR" の効果と、margin、spacing、texture-size の各バリエーションを確認します。報告された構成全体でGPUレイヤーがタイル間に線を表示せずにレンダリングできるか、または失敗する構成と原因が文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
40.7k
フォーク
7.2k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

phaserjs/phaser のほかの issue

phaserjs/phaser の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。