Skip to content

round canvas size#1506

Merged
elalish merged 1 commit intomasterfrom
roundingError
Sep 9, 2020
Merged

round canvas size#1506
elalish merged 1 commit intomasterfrom
roundingError

Conversation

@elalish
Copy link
Contributor

@elalish elalish commented Sep 3, 2020

Fixes #1503

Well, I can't repro the issue so I can't be sure, but this seems a likely fix. @hybridherbst Can you verify this fix before I merge?

@elalish elalish self-assigned this Sep 3, 2020
@elalish elalish merged commit 88455b4 into master Sep 9, 2020
@elalish elalish deleted the roundingError branch September 9, 2020 20:17
@hybridherbst
Copy link
Contributor

hybridherbst commented Sep 10, 2020

Sorry I was too slow with testing 😔
Will test from master.

@hybridherbst
Copy link
Contributor

hybridherbst commented Sep 11, 2020

@elalish I finally got to test this; looks like it's nearly fixed!
From zooming around I can see that now all resolutions stay at exactly the same pixel values but 90% and 110% still jump by a pixel, reducing clarity. This means that almost every zoom looks super crisp and sharp but the common values of 90% and 110% are still somewhat blurry.

Without the PR, all values would be slightly different and thus everything was slightly blurry at all but 100% values. Now, only those two jump by a pixel.

200911-145602
(the relevant part is that in the lower right, the <canvas width=518 height=1121> jumps to <canvas width=519 height=1122> when zooming at 90% and 110%.

@elalish
Copy link
Contributor Author

elalish commented Sep 16, 2020

@hybridherbst Thanks for verifying. Let's see if this second PR fixes it, as Three wasn't using the same kind of rounding I was.

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

Successfully merging this pull request may close these issues.

Model-Viewer sometimes renders blurry (wrong res?) on some devices when some sort of zoom is used

2 participants