You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a little confused about AdaptiveDpr and how it works. In the documentation (https://github.com/pmndrs/drei?tab=readme-ov-file#adaptivedpr) it says that AdaptiveDpr sets the DPR of the Canvas based on the Canvas performance min/max settings.
Drop this component into your scene and it will cut the pixel-ratio on regress according to the canvas's performance min/max settings.
Is this actually how it works? I checked out the source of AdaptiveDpr and it doesn't seem as if min/max settings are regarded at all.
I'm using the following Canvas code and regardless of the min/max settings I enter, the calculated DPR stays the same. Do I have to somehow set the initial DPR? And if so, how?
For anyone else struggling with this, you set the min/max DPR with the canvas prop dpr={[0.5,2]), for a min DPR of 0.5 and max of 2, for example. This means that if your device can handle it, the DPR will be a maximum of 2 and a minimum of 0.5. This DPR setting doesn't change on its own.
The value of performance.current is calculated based on a devices current performance to a range value between 0.0 and 1.0 . This value is then clamped to the min/max values of the performance prop. The current performance is multiplied with the DPR value from above. So when performance is 1.0 and the DPR is 2, the resolved DPR is 2. If performance drops to 0.5, the resolved DPR will be 1 and so on.
What is your question:
I'm a little confused about AdaptiveDpr and how it works. In the documentation (https://github.com/pmndrs/drei?tab=readme-ov-file#adaptivedpr) it says that AdaptiveDpr sets the DPR of the Canvas based on the Canvas performance min/max settings.
Drop this component into your scene and it will cut the pixel-ratio on regress according to the canvas's performance min/max settings.
Is this actually how it works? I checked out the source of AdaptiveDpr and it doesn't seem as if min/max settings are regarded at all.
I'm using the following Canvas code and regardless of the min/max settings I enter, the calculated DPR stays the same. Do I have to somehow set the initial DPR? And if so, how?
Thanks!
The text was updated successfully, but these errors were encountered: