‘Advanced Night Vision‘ is a highly configurable, AAA quality and easy to use night vision effect. Perfect for FPS and horror games. PC and mobile. Full source code included.
Adding the effect.
Select the camera you’re going to use (usually called ‘Main Camera‘) in the ‘Hierarchy‘ editor window (1), then click on ‘Add Component‘ button in the ‘Inspector‘ window (2).
Now you can select the effect in two different ways. The first way is using the search field and write ‘Advanced Night Vision‘, then select the effect (1). The second way is select the category ‘Image Effects‘, and finally ‘Advanced Night Vision‘ (2).
Setting the effect.
The inspector has these areas:
In the first section (1) we can change the quality of effect. The parameters of this area directly affect the quality of graphics and the complexity of the effect. Some parameters in other areas may be affected by what you select here.
In the second section (2) we can adjust controls that affect the color. In the third section (3) we can configure some glitches. If you click on 4, you will open the online help (this site) and if you click on the “Reset ALL” button (5), many parameters will set to its default values.
- Shader passes [One pass, Multipass]. The number of passes used by the shader. Less passes is faster, but will have less effects.
- Render size [Normal, Half, Quarter]. The resolution of RenderTexture. Lower resolutions are faster, but the quality is worse.
- Blur passes [0 – 10]. Less passes is faster, but the quality is worse. Multipass only.
- Glow strength [0 – 25]. Less is faster. Multipass only.
Blur and Glow effects are disabled if they are 0.
You can select two modes: Simple and Advanced. The second gives better results but is more complex.
- Tint color.
- Tint color amount [0.0 – 1.0].
- Exposure [0.0 – 100.0]. Higher, brighter.
- Brightness [-1.0 – 1.0]. This and the rest of parameters, only in advanced mode.
- Constrast [-1.0 – 1.0].
- Saturation [0.0 – 1.0].
- RGB offset to define the black and white look.
Here you can adjust some typical defects of optical equipment: Vignette, Chromatic Distorsion (Multipass only), Noise and Scanlines.
- Types of mask: Screen, Monocular or Binocular. If you select None, turns off the effect.
- Vignette scale [0.0 – 100.0]. How big is the mask.
- Vignette softness [0.0 – 10.0]. How soft are the edges.
- Chromatic distorsion: Advanced or Simple. If you select None, turns off the effect.
- Distortions passes [3 – 24]. Less passes is faster, but the quality is worse. Advanced only.
- Chromatic aberration [-100.0 – 100.0].
- Barrel distortion [-100.0 – 100.0]. Advanced only.
- Noise grain [0.0 – 10.0].
- Scanlines [0.0 – 2.0].
Noise and Scanline effects are disabled if they are 0.