Script and Shader for Gameboy effect for Unity3D
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets Update test_gameboy_scene.unity Jan 19, 2019
Logs Changed project structure Jan 18, 2019
Packages Changed project structure Jan 18, 2019
ProjectSettings Changed project structure Jan 18, 2019
.gitattributes initial commit Aug 3, 2014
.gitignore Changed project structure Jan 18, 2019
GameBoyEffect.gif Improved scene for GIF continuity Jan 19, 2019 Improved efficiency Jan 18, 2019

Gameboy Effect


This is an example Unity3D project that pixelates the output and quantizes to four colors, to look like a Game Boy game.

It uses OnRenderImage, Graphics.Blit and a custom shader for the effect itself.

Previously, Unity3D free didn't have Image Effects, so this effect was implemented by grabbing the framebuffer using ReadPixels, drawing a screen filling quad using straight GL and postprocessing using the same shader. It was very inefficient.

Feel free to use this however you want for any kind of project, no need to attribute or ask permission. But I'd love to know if you use it, you can reach me at @sergilazaro.


In order to use this in your project, you just need PixelatedEffect.cs and pixel.shader. Attach the PixelatedEffect script to the camera, and link the Shader to it. You might also want to remove the OnGUI button.

If you choose a factor of 4x to upscale, and you want a game resolution of e.g. 160x144 (Game Boy), you need to set the Unity resolution to 4 times that value, so 640x576.