better-unity-webgl-template
better-unity-webgl-template copied to clipboard
Work great on PC (fullHD) but it look pixelated in the mobile browser (fullHD+)
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!
You can try deleting this line in Assets/WebGLTemplates/Better2020/index.html
https://github.com/greggman/better-unity-webgl-template/blob/ba9152705c2f4a58ab5ab58f86f8d3f61fd079ed/Assets/WebGLTemplates/Better2020/index.html#L70
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
hey @greggman! Just curious - do you intend to persist that change? Because I just faced the same issue and your solution helped.
@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.