In the doc of setPixelRatio() in WebGLRenderer, it says:
Sets device pixel ratio.
But I think how it implemented in WebGLRenderer is not.
From reading the code of WebGLRenderer, it’s actually making
canvas.width = canvas.style.width * WebGLRenderer's.pixelRatio
WebGLRenderer's pixels = CSS pixels * WebGLRenderer's.pixelRatio.
On mobile devices, the web page can be scaled(I think by default it’ll be scaled if you don’t define the scale in viewport meta). And the actual DevicePixels is:
Device Pixels = CSS pixels * zoom level * devicepPixelRatio
If we want to match the WebGLRenderer’s pixels with device pixels, then you will get:
WebGLRenderer's.pixelRatio = zoom level * devicepPixelRatio
Do you think the document is correct?