TilemapGPULayer render issue causing lines between tiles
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.3k
- Forks
- 7.2k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen and reproduce the artifact in TilemapGPULayer using the provided tilesets, comparing it with a normal layer. Check the effect of mipmapFilter: "LINEAR_MIPMAP_LINEAR" and the margin, spacing, and texture-size variants. Done means the GPU layer renders without lines between tiles across the reported configurations, or the failing configuration and cause are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100