Skip to content

Vector sprites appear jagged after exiting full-screen mode #526

@adroitwhiz

Description

@adroitwhiz

Expected Behavior

Vector sprites should never appear jagged.

Actual Behavior

Vector sprites appear jagged if you enter full-screen mode then exit it:

Before full-screen After full-screen
image image

This is because of Drawable.useNearest. #480 changed useNearest to take stage scale into account, but there's one missing variable still: the skin's dimensions.

In normal-stage mode, useNearest enables nearest-neighbor sampling because the drawable's screen-space scale is 100%. It doesn't ensure that one screen-space pixel is roughly the same size as one skin-texture pixel, assuming it to always be true. Entering full-screen mode causes the SVG skin to re-rasterize at a higher resolution, breaking this assumption.

Steps to Reproduce

  1. Create a new project
  2. Enter full-screen mode
  3. Exit full-screen mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions