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

Work great on PC (fullHD) but it look pixelated in the mobile browser (fullHD+) #21

Open
nminhhoangit opened this issue Aug 25, 2021 · 3 comments

Comments

@nminhhoangit
Copy link

Your template work great on browser in pc. But when I open from mobile browser with fulldHD+ resolution it look very pixelated. This not happened on unity editor or build to android apk but only in webgl on mobile browser only.

Please help me to solve this. Thanks!

@greggman
Copy link
Owner

greggman commented Aug 26, 2021

You can try deleting this line in Assets/WebGLTemplates/Better2020/index.html

Be aware that higher-res = lower performance

You might also consider something like

 config.devicePixelRatio = Math.min(config.devicePixelRatio, 2);  // or 3 etc. 

Some phones are as high as 4 I believe which is up to 16x slower than 1

@Enigo
Copy link

Enigo commented Feb 23, 2022

hey @greggman!
Just curious - do you intend to persist that change?
Because I just faced the same issue and your solution helped.

@greggman
Copy link
Owner

@Enigo, At the moment I don't intend to persist that change. You should just edit your local copy to do what's right for your app. There's no "one size fits all" solution here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants