Loss of sharpness since updating to v6 react-three-fiber

As the title, v6 of r3f seems to now be ignoring

  `pixelRatio={window.devicePixelRatio}`

Have I missed something in the changelog in how pixel ratio is now handled ?

Cheers!

image
image

r3f - 6.0.14
three - 0.127

If this refers to the Canvas property, I think it has been renamed to

dpr={window.devicePixelRatio}

in v6.

hmm that doesn’t seem to work

Ok this did the trick

 dpr={(Math.min(window.devicePixelRatio), 2)}
1 Like

For completeness, the change log is here: Release 6.x · pmndrs/react-three-fiber · GitHub

sorry, i mixed up min/max in the clamp function :-S

someone fixed it: Fix clamp in setDpr by anotherzxx · Pull Request #1256 · pmndrs/react-three-fiber · GitHub

the correct notation should be:

<Canvas dpr={[1, 2]}>

no lower than 1, prefer 2 if available (if uses window.devicePixelRatio to check against it): Math.min(Math.max(dpr[0], window.devicePixelRatio), dpr[1])

1 Like