VHS Pro
Post-processing shader that emulates CRT screens
tags: gamedev, indiedev, unity, c#, glsl, glitchart, retrogaming
Overview

VHS Pro is a camera post-processing effect for Unity 3D that emulates look and feel of old Cathode Ray Tube ( CRT ) screens. It emulates phosphor screen trail and signal bleeding, VHS tape noise (VHS data corruption), interlacing and jitter (deviation) in the analog video signal. It's best for for 2D console-like games, 80's/90's/Retro/VHS look, security cameras, robot/computer vision and video processing.

Buy on Asset Store

Features

1. Cathode Ray Tube Emulation
Emulates CRT Screen. Signal bleeding, fisheye, discretion (quantization) and vignette.

a. Vertical Resolution / Quantization
The picture will be quantized vertically by lines. You can choose the amount of lines. You can choose between these modes:
"FullScreen" (no quantization),
"PAL 240 Lines" (240 Lines per height),
"NTSC 480 Lines" (480 Lines per height) or
"Custom" (you can set custom number of lines).

b. Bleed Mode
“Bleeding” is a signal decay (tail). You can choose between different modes: "Old Three Phase", "Three Phase", "Two Phase". These modes emulate different signal bleeding curves. You can also make bleeding longer or shorter.

c. Custom Bleeding Curve
Allows you to generate your own bleeding YIQ curves. Sync YQ channels and change the Bleed Length.

d. Fisheye
Emulates real screen by "bending" the corners of the image and making wide-angle lens effect. You can adjust fisheye amount.

e. Vignette
Emulates vignette (reduction of an image's brightness or saturation at the periphery compared to the image center). You can adjust amount and change speed how often it pulsates.​

2. Noise
Emulates different sorts of noises.

a. Vertical Resolution / Quantization
The noise vertical quantization. You can inherit from the CRT Vertical Resolution or use custom vertical resolution for noise which is different from CRT Vertical Resolution.

b. Quantize Noise X / Pixilate
If you want to quantize noise by width (i.e. make squares instead of tiny vertical lines) then adjust this value.

c. Background Noise
This is a simple background noise (“film grain”-like noise). You can adjust transparency.

d. Tape Noise
Emulates noise which you can find on old VHS cassettes. Noise lines floating down the screen. You can adjust transparency and speed.

e. Line Noise
Emulates noise in the analog video signal and VHS cassettes. Noise lines popping up randomly within the screen. You can adjust transparency and speed.​

3. Jitter
Emulates deviations in the analog video signal and CRT.

a. Floating Lines
After the screen was quantized vertically it consist of the horizontal lines which will float down the screen if this option is on. It works the best on the low resolution.

b. Scan lines
Draws the black lines in between the screen lines. You can adjust the width.

c. Stretch Noise
Emulates noise, and data corruption on the VHS cassette plus some CRT jitter. Looks like if some of the screen lines were stretched and floating up and down the screen.

d. Jitter Horizontal
Emulates interlacing jitter. You can adjust the amount.

e. Jitter Vertical
Emulates analog video signal and CRT jitter. Adds a bit of YIQ shifting. You can adjust transparency and speed.

f. Twitch Horizontal
Shifts/displaces the image horizontally sometimes. You can adjust the frequency.

g. Twitch Vertical
Shakes/Shifts screen horizontally sometimes. The images "jumps" or "falls" vertically. You can adjust the frequency.​

4. Analog Signal Tweak
YIQ is the color space used by the NTSC color TV system. The analog video signal is transmitted in YIQ and not in RGB. In this section you can adjust the YIQ values.

a. YIQ Permanent Adjustment
"Adjust Y", "Adjust I", "Adjust Q" - use these to make a permanent adjustment.

b. Shift YIQ
"Shift Y", "Shift I", "Shift W" - use these to tweak/shift the values.

c. Gamma Correction
Use this to balance the gamma (brightness) of the signal.​

5. Phosphor Trail
Emulates phosphor screen decay.

"Input Cutoff" - Adjusting brightness threshold of input. How much of each frame affects the trail.
"Input Amount" - Amplifies the input amount after cutoff.
"Fade" - Adjusts how fast the trail fades. In other words it's a feedback amount.

6. Tools
Additional tools.

a. Unscaled Time
When you are pausing the game using Time.timeScale = 0 (or Application.timeScale = 0) it stops all the animation, sound, etc. It also stops shader timer and it's animation. If you still need shader to run while this sort of pause you can use "unscaled time" feature. The shader will keep running even when your Time.timeScale == 0. It will use Time.unscaledTime instead of Time.time.​

b. Debug Bleed Curve
Helps to debug bleed curve.

c. Debug Trail
Helps to debug phosphor trail.​

8. Custom Texture

You can use custom MovieTexture or Sprite if you want it to be affected by the effect.

Full description and dev thread here

Examples
Future Development

In the recent future I'm going to make mobile optimisation of the shader. Besides that I'm working on additional shader which emulates retro console colors - Graphic Adapter Pro .

Back to main page