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

Size of renderTexture and the rendering quality #6988

Open
rexrainbow opened this issue Dec 18, 2024 · 0 comments
Open

Size of renderTexture and the rendering quality #6988

rexrainbow opened this issue Dec 18, 2024 · 0 comments

Comments

@rexrainbow
Copy link
Contributor

rexrainbow commented Dec 18, 2024

Version

  • Phaser Version: 3.87.0
  • Operating system: win11
  • Browser: chrome, firefox

Description

In conclusion, RenderTexture with (even width, even height) size has better rendering quality.

Test code

The texture size is 641x73 = odd width, odd height,
render.roundPixels is enabled

Game objects from top to bottom are :

  1. Image game object for showing texture.
    • Rendering quality is good if render.roundPixels is enabled. Blur when render.roundPixels is disabled.
  2. RenderTexture with size 641x73 (odd width, odd height), equal to pasted texture
    • Blur, no matter the render.roundPixels is enabled or disabled.
  3. RenderTexture with size 642x73 (even width, odd height)
    • A little blur
  4. RenderTexture with size 642x74 (even width, even height)
    • Rendering quality is good as 1. Image game object, no matter render.roundPixels is enabled or disable. i.e. the rendering quality is better than Image game object when render.roundPixels is disabled.
  5. RenderTexture with size 662, 94 (even width, even height)
    • Rendering quality is good as 4. RenderTexture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant