Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdaptiveDpr min/max settings #2052

Open
ynamite opened this issue Jul 26, 2024 · 0 comments
Open

AdaptiveDpr min/max settings #2052

ynamite opened this issue Jul 26, 2024 · 0 comments
Labels
question Further information is requested

Comments

@ynamite
Copy link

ynamite commented Jul 26, 2024

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?

<Canvas
    gl={{
        antialias: false,
        stencil: false,
        powerPreference: 'high-performance',
        outputColorSpace: 'srgb',
    }}
    performance={{ min: 0.1, max: 0.5 }}
>
    <AdaptiveDpr pixelated />
</Canvas>

Thanks!

@ynamite ynamite added the question Further information is requested label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant