2D Pixel Art in 16:9

Hey guys,

I’m completely new to game dev and trying to set up a scenery for a pixel art based game in unity. I’ve read a bunch of things about the pixel perfect camera package etc., but can’t quite get my head around it.

I’d like my game to run in 16:9, scaling according to the screen size, so that the game will always display at 100% width of the screen. Will I need the pixel perfect camera package in this case at all, or will it cause the game to display at a certain resolution independent of the players screen size/resolution?

Will I have to work with specific resolutions when I create my graphics in order to make it work? I’ve read something about using a subsets of the final display resolution. However I’m not even sure if it is possible to find a subset resolution that will perfectly scale with any screen size/resolution that the user might work with.
I’m trying to make the game look pixelated, but not too coarse.

Can you recommend any tutorials/articles that explain how screen size, screen resolution, camera resolution and units ultimately relate?

Thanks a lot!

Step #1: Pick a target, pixel-friendly resolution, and stick to it. It would need to be a 16x9 ratio, and small enough to allow for a more pixel-art style.

Step #2: Render your scene using an Orthogrpahic camera, and render it to a lower-resolution RenderTexture. RenderTextures are frequently used for special effects, such as mirrors. But they can also be used for targeted or redirected alternative rendering. Using them for rendering low-res pixel art is actually quite appropriate.

Step #3: Create a Quad for your scene, and scale that quad automatically so that it stretches to the dimensions of the current display. (fills the screen) Now apply your RenderTexture to it, most likely with an Unlit/Texture shader.

Step #4: Make sure that your RenderTexture has all it’s mip-mapping switched off, and also has anti-aliasing switched off for your project’s export settings. Make sure that its FilterMode is set to Point.

With this approach, you should be able to get a pretty solid, scalable pixel-art friendly rig that fills the entire screen. It won’t necessarily be pixel-perfect, but it will be close enough for the majority of users. Scaling is part of the issue for pixel-perfection. To increase your chances, you should probably select a target resolution that integers scales with common displays. I recommend 640 x 360. It is low-res enough to give a nice retro-look, and it scales extremely well for most of the major screen resolutions. It multiplies smoothly into 720p, 1080p, and 4K. Anyone who has a standard screen will get pixel-perfect visuals using that resolution.

Thanks, that’s really great information! I’ll check everything out :slight_smile: