-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Library override the DPR setting in autonomy without chances to clamp / control it #765
Comments
hey @alvarosabu /. @andretchen0 saw you took care of this (love) but i think there is still an issue. You would think is fine buuut if you are working with screen resolution (so DPR) in a shader this behaviour is kinda odd because you need to update the screen-size there but there is no way to detect is changed without a resize currently. IMHO solutions are 3
|
Sure thing. Reopening. We're currently discussing some changes to the core. I'll make sure that this is part of those discussions. |
I noticed that Tres set the DPR (see code) completely in autonomy without any way to control that, imho is conceptually wrong for couple of reasons:
but on resize switching between monitors on my macbook was set back to 2 due the
useDevicePixelRatio
hook. This second point tho depends on the first one. If We decide to let the app handle the resize, it's 100% needed to add aclamp
on that.This can lead to some big issues, both perf wise and effect wise. I notice the "issue" because i was doing some effect in screen-space, where my resolution wasn't matching my DPR
vec2 st = gl_FragCoord.xy / (gResolution * gDpr);
My take on this is that the library can take care of the DPR but at least give the user some way to control, like they don in
r3f
where you can setdpr=[low, high]
that clamps it :)Reproduction
Steps to reproduce
System Info
Used Package Manager
npm
Code of Conduct
The text was updated successfully, but these errors were encountered: