-
Notifications
You must be signed in to change notification settings - Fork 340
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
Should vector skins/costumes always be rendered with a resolution greater than their screen-space dimensions? #620
Comments
@cwillisf @fsih @adroitwhiz, assigned this to you for discussion (and then documenting here) |
The fix itself is quite easy to implement-- I already have it up in a branch: The hard part is benchmarking across devices to make sure the increased RAM usage is acceptable (and figuring out what "acceptable" means). |
@adroitwhiz Have you also looked at why the vector sprites have odd cropping? |
Discussion:
|
Next steps @adroitwhiz do you have the PR for https://adroitwhiz.github.io/scratch-gui/no-vector-blur/ up somewhere for us to look at? @BryceLTaylor could you run a project with a lot of vector sprites on a Raspberry Pi and compare if it's noticeably worse on https://adroitwhiz.github.io/scratch-gui/no-vector-blur/ vs prod? |
Just created a PR for this change: #649 |
I tested the branch on a Raspberry Pi 4 by playing a MAP (https://scratch.mit.edu/projects/398958757/). On production after 20 or so seconds of playing the project the whole computer became unresponsive. The mouse cursor moved several seconds after I had tried moving it, and then eventually stopped moving altogether. I had to restart the whole machine. Also, on a project with just the default cat I saw some somewhat strange behavior when sprites were at 117% and 118% size, but I have been unable to reproduce it. The cat does look a little less blurry to me than with a similar project on production. |
This bug is linked to this fix but it's still not fixed. Can 5886 be reopened? |
Expected Behavior
Vector skins/costumes should appear sharp at all scales.
Actual Behavior
Vector skins are internally represented by a series of textures at various resolutions. These textures are allowed to appear on-screen at up to 1.5x their resolution, meaning that at worst, 1 "texture pixel" will be magnified to 1.5 "screen pixels". This results in vector sprites often appearing blurry:
This blurriness is particularly bad for things like text, which results in issues like #558.
This could be changed so that the textures must always be at a higher resolution than, or the same resolution as, their "screen-space" dimensions. This would consume more RAM, but the improvement in visual fidelity may well be worth it.
Keep in mind that until last October, vector costumes were rendered at least twice as large as they should have been on high-DPI devices like phones, so this shouldn't have an unprecedented RAM impact.
Steps to Reproduce
Operating System and Browser
All
The text was updated successfully, but these errors were encountered: