WebGL screen not fully rendered on html canvas #472
-
Hi there, I have an
The
And the WebGL window is initialized by:
Any ideas? (you can try it at https://www.gauzilla.xyz/#5) Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Most likely it's device pixel ratio. On some screens you have a multiplier (device pixel ratio) that takes you from logical pixels (the canvas size) to physical pixels (what |
Beta Was this translation helpful? Give feedback.
Most likely it's device pixel ratio. On some screens you have a multiplier (device pixel ratio) that takes you from logical pixels (the canvas size) to physical pixels (what
three-d
expects). You can query the device pixel ratio, then multiply that with your canvas width/height before constructing the screen render target.