RetroTV Effects

A set of effects and scripts designed to give games in Unity a highly authentic retro flair.

The impetus behind this effect was seeing the sorts of effects a lot of emulators provide out of the box, especially Blargg's work, meant to give emulated games an even more nostalgic push by giving the appearance of an old television by emulating NTSC signals.
The closest effects available for Unity don't really try and replicate the way old TVs work, instead they impose a series of artistic effects more like old damaged VCR tapes. With the continuing popularity of retro-style pixel art games, I wanted an effect that would provide a very nostalgic and authentic appearance, and the best way to do that I figured was to emulate the way the video signals worked.
RetroTV does this in several passes - first, converting the input RGB color into the YIQ color space used by NTSC television sets. Then, it emulates the artifacting that would result from a composite video cable by interleaving that YIQ data. A composite cable only carries one signal, so the YIQ data is spread across several pixels using separate sine and cosine waves. Then it's "decoded" by sampling pixels using the same sine/cosine waves. Since this results in noticeable banding (because the resulting image has separated Y, I, and Q components), the "signal" is lowpassed with a simple box filter, just enough to reduce the banding into a more recognizable image. Adding a per-scanline offset to these sine and cosine waves which increments each frame results in a "crawling" effect which some older consoles exhibited.
S-Video works similarly, except Y is moved into a separate color channel (because S-Video separates Luma and Chroma signals), noticeably improving pixel clarity but still maintaining subtle color bleeding.

A live HTML5 demo can be found here, showing a variety of settings. For best results, use Firefox or any browser that supports ASM.JS and enable fullscreen mode.
All artwork and sounds were created by me for the purposes of this demo.