Controls

  • WASD/arrows: Drive vehicle. Vertical axis to accelerate. Horizontal axis to steer.
  • Space bar: Toggle post process on/off (Depth of field+Vignette)
  • -/+: change pixel size of pixelated vehicle.

ProPixelizer

A real-time pixelisation shader for Unity

Links: Asset StoreWebsite

Features

  • For a full feature list and requirements, check the website.
  • Per-object pixelization.
  • Per-object color grading and palette reduction.
  • Per-object movement at screen resolution, without pixel creep.
  • Multiple lights.
  • Shadowcasting, intra- and inter- for between pixelized and unpixelized objects.
  • Per-object outlines.
  • Compatible with post processing effects, such as depth of field.


Technical details (and some other info)

I wanted to achieve a retro/pixelated feel for a game I was making, but I didn't have time to draw hundreds of sprites from different angles. While looking for a solution, I found several pre-existing shaders and packages for Unity, but most of these achieve a pixelated look by separately rendering objects to a low-resolution texture, and then mixing them back with the scene view. They works, but has several disadvantages:

  • If using one lower resolution render target:
    • Pixel creep occurs as objects move across the screen.
    • Limited ability to have per-object pixelization, or to mix pixelized and non-pixelized assets.
    • Cannot have objects with different pixel grids. This means that if you want to eliminate pixel creep, you cannot allow sub-pixel movement of objects - you have to clamp objects to the pixel grid of the lower resolution render target. For example, to pixelize into 3x3 screen pixels you will have to clamp all pixelized objects to the same 3x3 screen pixel grid.
  • Some of these can be mitigated by having one render target per object, then compositing the individual renders afterwards (eg, by apply the RT to a plane in the scene). I tried something like that here. However:
    • This gives complications with occlusion/overlapping.
    • Unacceptable overhead per object for scenes with many individual objects.
    • Inability for objects to shadow cast onto each other.
StatusPrototype
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorElliotB256
Made withUnity