Skip to content

Size of renderTexture and the rendering quality #6988

@rexrainbow

Description

@rexrainbow

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions