Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel Sprite render issue #7018

Open
1 task done
Oxey405 opened this issue Oct 6, 2024 · 3 comments
Open
1 task done

Panel Sprite render issue #7018

Oxey405 opened this issue Oct 6, 2024 · 3 comments
Labels
🐛 bug This is a bug impacting users

Comments

@Oxey405
Copy link
Contributor

Oxey405 commented Oct 6, 2024

Is there an existing issue for this?

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
image
The artifacts seem to depend on the position of the camera...

Steps to reproduce

  1. In a GDevelop project create a PaneSprite with a repeating texture (don't stretch center)
  2. 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

@AlexandreSi
Copy link
Collaborator

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).

@Oxey405
Copy link
Contributor Author

Oxey405 commented Oct 7, 2024

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

@AlexandreSi AlexandreSi added the 🐛 bug This is a bug impacting users label Oct 7, 2024
@AlexandreSi
Copy link
Collaborator

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.

Repository owner deleted a comment Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug impacting users
Projects
None yet
Development

No branches or pull requests

2 participants