‘Synth Lines’ creates horizontal lines on the screen that curve determined in the brightness of the pixel.
Once installed, select the scene camera and add the ‘Synth Lines’ component. Doing so you will see something like this:
Modify the intensity of the effect with ‘Strength’ (1). The effect has three different modes that you can change in ‘Mode’ (2). The first is ‘Screen’ and affects the entire screen. The second mode is ‘Layer’ and with it you can select which objects you want the effect to affect according to their layer.
Select the layers in ‘Layer mask':
The third mode is ‘Distance’ with which you can modulate the intensity of the effect according to the distance and with the function that you define in ‘Curve':
The vertical axis is the intensity of the effect and the horizontal is the distance to the camera between ‘Near’ and ‘Far’ planes.
The ‘Layer’ and ‘Distance’ modes use a depth camera. It is recommended that you adjust the ‘Far’ distance of your camera as much as possible to gain precision and avoid mistakes.
If you still see some errors, you can adjust the precision in ‘Depth threshold’ (13).
In the group ‘Lines’ you can configure the lines that the effect generates.
You can change the number of lines (3), how much the pixel brightness (4) affect it and its width (5). You can also adjust the quality of antialiasing (6). The next thing you can change is the color (7), brightness (8), contrast (9), gamma (10), hue (11) and saturation (12) of the lines.
These color parameters can also be adjusted for the background of the lines in the ‘Background’ group.
Finally, clicking on ‘[doc]’ (14) will open the website with the documentation and if you click on ‘Reset’ (15) all the parameters will return to their default values.
All the code is inside the namespace ‘Nephasto.SynthLinesAsset’ and the main component is ‘SynthLines'. The first thing you should do is import the namespace:
If ‘myCamera’ is a valid camera and you want to add the effect to it, you can do something like this:
For more information see the code comments and the attached demo.
Any questions or suggestions you have, I will be happy to answer you in