google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
7.02k stars 825 forks source link

remove DPR cap #4896

Closed elalish closed 2 months ago

elalish commented 2 months ago

For the history of MV, we have only taken device pixel ratio (DPR) into account when a <meta viewport> tag was present on the page, since the default page scaling that happens on mobile browsers could cause us to render at far too high a pixel density and kill performance. However, we've now had dynamic render scaling built in for some time that dynamically reduces pixel density to maintain frame rate as necessary, and this is a much safer and more general approach to the problem.

We've occasionally run into pages that don't both to put a <meta viewport> tag in, even though they are modern pages, and high pixel-density screens are more and more common even on desktop, so I think at this point it's safer to remove our heuristic. This will ensure we are rendering at screen resolution across devices, and only downsampling under performance constraints.