playcanvas / playcanvas/engine
Tile Sprites render incorrectly when pixels per unit is low and margins are small
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Project: https://playcanvas.com/project/919232/overview/tiled-sprite-project
When the pixles per unit is 1 and the margins are close or the same as the boundary of the sprite, the mesh is larger than the sprite bounds
eg


Renders like this:

Whereas a sprite with the boundaries

Renders correctly

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
Reproduce the issue with the linked tiled-sprite project using pixels per unit of 1 and margins near the sprite boundary. Trace the tile-sprite mesh generation and verify that the mesh bounds match the sprite bounds in the failing case while preserving the correctly rendered boundary case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100