Once installed, select the camera of your scene and add the component with the effect you want to add. If you type ‘Video Glitch’ the list of available effects will appear. You can also access the full list at ‘Image Effects / Nephasto / Video Glitches’.
Once the effect is added, you will see something like this:
Each effect can have some extra parameters (3), but they will have the ones you see in the image. The first is the intensity of the effect (1). Below you can modify the mode, which can be ‘Screen’, ‘Layer’ and ‘Distance’. Later we will see what they do.
By clicking on ‘[doc]’ (6) you will be able to consult the online help and on ‘Reset’ (7) you will change all the parameters to their original values. By activating ‘Color’ (4) you can modify some parameters that will affect the final color.
These parameters are brightness (1), contrast (2), gamma (3), hue (4), and saturation (5).
As I said before, all effects have three modes. The first is ‘Screen’ and it is the default mode. When using it the whole screen will have the effect. With the ‘Layer’ mode you can select the layers that will be affected by the effect.
Just select the layers in ‘Layer mask’ (1). If you see some precision issues, you can adjust it to ‘Depth threshold’ (2).
With the ‘Distance’ mode you can create a curve (1) that modulates the effect according to depth. The range starts at Near and ends at Far of the camera.
If you see some issues with accuracy in any of these modes, try setting your camera’s ‘Far’ parameter all the way down. The ‘Layer’ and ‘Distance’ modes add a depth texture to the camera and may not be available on some older mobile devices or browsers. Some effects use 3D textures, if the hardware does not support it they will be simulated using 2D textures.
Finally in ‘Advanced settings’ if you deactivate ‘Use scaled time’ (1), the time multiplier will not affect the effects and you can scale it using ‘Time scale’ (2).
All the code is inside the namespace ‘Nephasto.VideoGlitchesAsset’. The first thing you should do is import the namespace:
If ‘myCamera’ is a valid camera and you want to add the ‘VideoGlitchBrokenScreen’ effect to it (for example), you can do something like this:
All effects derive from ‘VideoGlitchBase’, see comments in your code. For more information consult the code and the attached demo.
Any questions or suggestions you have, I will be happy to answer you in