- Home /
blurred low res display in compiled build
When I try to run a Unity build in low res fullscreen the display gets all blurry like a low quality youtube video. But the same resolution in the editor looks amazingly crisp and sharp even when scaled up.
Okay, I know that non CRT displays are not designed to handle non native resolutions, but the Unity editor seems to handle it just fine. I can set any custom resolution I can imagine and it looks pixel perfect always and in any scale. What is the magic behind this? Is there any way to apply this magic to the compiled build? I was using pixel shaders and render textures to work around this but it's such a waste of system resources as I have to render the screen in full HD just to have a quality low res... I don't need the camera to be pixel perfect. The pixels can be stretched to match the screen as long as they stay sharp. All I need is to get rid of this horrible blur. Is that possible?
Answer by nmhild_RP · May 10, 2020 at 07:57 PM
Hello all! I was having this same problem earlier and wanted to chime in on some unanswered threads in case others are searching for a solution in vain. I provided what worked for me over here, but I'll copy/paste most of that response to save folks some clicking -
So for me, the problem had to do with my misunderstanding of game resolution versus the target render resolution using the Pixel Perfect Camera. The TL;DR version is "set your overall game resolution high, keep your Pixel Perfect Camera settings low."
My game is using a target resolution of 384x216 because it's a perfect 16:9 resolution which also allows my 16x16 tiles to fit nicely on both the x and y-axis without any clipping. I'm also using a 16 ppu setting.
Because of my settings, and because I was using "Upscale Render Texture" on the Pixel Perfect Camera, it made sense to me to set the game resolution to 384x216 as well - I thought it would upscale appropriately when run. That was wrong. What I actually wanted to do was keep my Pixel Perfect Camera settings the same, but run my game at a much higher 16:9 resolution (for my purposes, one that was also divisible by 16 on both axis, though that's not super important). So here are the settings I used (the Pixel Perfect Camera component on top, the "Resolution and Presentation" settings below that) -
(If you don't know how to get to the "Resolution and Presentation" menu, go to File > Build Settings > Player Settings... (lower left of the popup) > Player (on the left side) > Resolution and Presentation. To enter your own resolution, you will have to unclick "Default is Native Resolution" - note that this only sets the native resolution and you can still give players the option to change the resolution in a graphics menu using the Screen.SetResolution(int, int, bool) method).
My splash screens and game went from being muddy to so fresh and so clean clean. Here is the difference -
I hope this helps! If you're not using the Pixel Perfect Camera component, I think your only option is to upscale your sprites before importing into Unity and still use a higher game resolution.
hi, i'm having this same problem but i literally have never heard of a pixel perfect camera. i don't even know how to make one of those, is it a plugin? i can't find this anywhere. my game is 3d, but i want it to be low res without pixel blurring, will a pixel perfect camera work? all the literature is calling it a '2d pixel perfect camera'
Answer by paternostrox · Feb 16, 2020 at 05:09 AM
Hi David, I'm a little late to the party. I'm having the exact same problem, on editor all fine, on build everything (even the unity logo) is blurred. Did you find any solution to this?
EDIT:
@nmhild_RP Thank you for your contribution, I think last time I had this issue I resolved it like you did. I had this issue again today and came back to this question.
This time it was related to a bug in the 'Default Is Native Resolution' option in 'Resolution and Presentation' menu. Even when the option is checked, unity would set a resolution that does not match with the monitor resolution. Unchecking it and changing default resolution to 1920x1080 (my monitor resolution), then building the game like this, then checking it back again seems to have fixed it.
The bug is said to be fixed a long time ago but it still can occur. You can check the issue tracker HERE.
Your answer
Follow this Question
Related Questions
Parts of terrain going invisible after building the game and changing ingame resolution 0 Answers
Game built for mac has much lower graphics quality than that in the Unity Editor 2 Answers
When exporting from Unity to Xcode my game is extremely pixelised 0 Answers
VR.WaitForGPU - Quality settings in Editor and Build 3 Answers
Build options with only resolution 2 Answers