GDevelop
GDevelop copied to clipboard
Panel Sprite render issue
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
As described in #6210 there is an issue in how the panel sprites are rendered when scaled
You can observe some artifacts on the following screenshot took at 0.5 zoom
The artifacts seem to depend on the position of the camera...
Steps to reproduce
- In a GDevelop project create a PaneSprite with a repeating texture (don't stretch center)
- Move the camera around and observe the artifacts I have made an example project to better explore thie issue 9PatchBugExemple.zip
GDevelop platform
Desktop
GDevelop version
5.4.213 // latest
Platform info
No response
Additional context
No response
Hi @Oxey405,
thanks for taking the time to report this. Here is my conclusion after a bit of investigation:
- The issue happens only if the resource is not smoothed;
- The issue does not happen with stretched panels (only repeating ones, aka as tiling sprite);
- The issue happens in the scene editor as well (at least this is consistent);
- This seems to be linked to the clampMargin parameter of the PIXI TilingSprite
With this parameter set at values around 5-10, the glitches appear when the view is "dezoomed": the greater the parameter, the more you have to zoom out for them to appear. But, with this range of values, the texture is affected.
I'm not sure how to continue with this. Maybe we should drop the current rendering methods (patchwork of sprites and tiling sprites) and use a tilemap instead (this issue does not seem to appear with tilemaps).
Hi @Oxey405,
thanks for taking the time to report this. Here is my conclusion after a bit of investigation:
- The issue happens only if the resource is not smoothed;
- The issue does not happen with stretched panels (only repeating ones, aka as tiling sprite);
- The issue happens in the scene editor as well (at least this is consistent);
- This seems to be linked to the clampMargin parameter of the PIXI TilingSprite
With this parameter set at values around 5-10, the glitches appear when the view is "dezoomed": the greater the parameter, the more you have to zoom out for them to appear. But, with this range of values, the texture is affected.
I'm not sure how to continue with this. Maybe we should drop the current rendering methods (patchwork of sprites and tiling sprites) and use a tilemap instead (this issue does not seem to appear with tilemaps).
Yes I think this pretty much sums up the technical part... @Bouh suggested it might be a PIXI-relared issue so I'll try to replicate it using just PIXI to see if it's about gdevelop's implementation or PIXI itself
Yes I think this pretty much sums up the technical part... @Bouh suggested it might be a PIXI-relared issue so I'll try to replicate it using just PIXI to see if it's about gdevelop's implementation or PIXI itself
I think that's a good idea. It would be a great starting point to report something to them if the issue actually comes from them.