Skip to content

ekx/PixelCamera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixelCamera

PixelCamera is a Unity3D script which was inspired by Ryan Nielson's excellent PixelCamera2D. It aims to improved the render quality of pixel art in Unity3D. It does so by rendering to a low resolution render texture. Instead of drawing this render texture to a quad, the render texture is blitted directly to the output of a second camera. It also supports custom upscaling shaders. Two example open source shaders are included under their respective licenses.

Screenshot

Screenshot

License

Instructions

  • Instantiate the "PixelCamera" prefab in your scene.
  • Optionally you can remove or add shader in the "PixelCamera" script on the game object called "RenderCamera".
  • Use the functions "CycleUsedShader()" and "SetUsedShader(int index)" to switch shaders during runtime.

For a basic setup see the included "Example.unity" scene.

Acknowledgements

  • CRT Shader - (CC BY-NC-SA 3.0) - Mattias
  • Nearest Neighbour Shader - (MIT) - jimbo1qaz
  • Example Image - (CC0) - Buch
  • Font - (CC0) - Kenney

Contributing

Please see the issues section to report any bugs or feature requests and to see the list of known issues.

Pull requests are always welcome.