Skip to content

Fix blurry Blender canvas on high-DPI displays - #2

Open
PolarisSdesu wants to merge 1 commit into
HeyPuter:masterfrom
PolarisSdesu:master
Open

PolarisSdesu wants to merge 1 commit into
HeyPuter:masterfrom
PolarisSdesu:master

Conversation

@PolarisSdesu

Copy link
Copy Markdown

Summary

Fix blurry Blender Canvas rendering on high-DPI displays.

Problem

The Canvas backing resolution was set directly to window.innerWidth and
window.innerHeight, without considering window.devicePixelRatio.

On displays with DPR=2, the Canvas was rendered at half the required physical
resolution and then scaled up by CSS, resulting in a blurry Blender viewport.

Changes

  • Scale Canvas backing resolution by window.devicePixelRatio
  • Update Canvas resolution on window resize
  • Update Canvas resolution on visual viewport resize

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.

1 participant