Weird canvas dimensions cause blurry render.
See original GitHub issueYou can observe this in the examples, find the canvas DOM node and compare the style dimensions with the canvas height and width attributes. Presumably, the ~2x difference visibly causes a blurry image:

Compare this with zooming out by 50%, the render is crisp.

I first noticed this in a project of mine that I did in both vanilla three.js and react-three-fiber, both using the exact same geometry, but the latter appearing blurry.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Weird canvas dimensions cause blurry render. #32 - GitHub
You can observe this in the examples, find the canvas DOM node and compare the style dimensions with the canvas height and width...
Read more >Render Comes Out Blurry - Adobe Support Community
Dimension comes with V-Ray built in. Please see the post above for instructions on changing Depth of Field which is likely causing the...
Read more >Fixing HTML5 2d Canvas Blur - Medium
Elements are rendered and painted to the screen with the appropriate styling. The problem lies between the first step and the second. In...
Read more >Canvas drawings, like lines, are blurry - Stack Overflow
I found that setting the canvas size in CSS caused my images to be displayed in a blurry manner. Try this: <canvas id="preview"...
Read more >What to look for when fixing blurry images at 2x - Bootcamp
Here is the problem. The image is being rendered with anti-aliasing to smooth the pixelation, but why? Simple, the browser is trying to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

yep, it divides it by two, i saw this in some three js examples and assumed this is the default. either way, i pushed an update that just doesn’t declare any pixelratio, three defaults to 1. you can set one by doing Canvas pixelRatio={…}
👍 Works great! Thanks!