Using Unity 2019.2.1f1, LWRP 6.9.1 and Shader Graph 6.9.1.You can get the article’s code and shaders here.
Scan effect shader uses depth intersection to determine where to render the scan object’s mesh.
When the camera renders a scene, it creates Depth texture, writing in it all opaque objects. Using this texture, you can get distance from scene geometry to camera. Scene Depth Node provides access to the Depth Texture in several different sampling modes. (For LWRP to access Depth texture, it must be enabled in the Pipeline Asset)
When you render your object, you can get the fragment’s distance from camera and compare it to the distance to scene geometry. The main trick is to compare Scene Depth node output and Position/Screen Position node output in the same space.(comparing value A in range 0..1 with value B in range near… far plane won’t make any sense.)
Unity 2019.2.1f1, LWRP 6.9.1 and Shader Graph 6.9.1. You can get the article’s code and shaders here.
Dissolve effect used for gradual appearing/disappearing of characters, force shields, etc.
In opaque rendering mode, this effect uses a texture, that is usually generated noise, as the mask to discard pixels.
Discarding means that for every fragment of your mesh, you sample the discarding mask. Take a value from any mask’s channel (for example, red) of the sample and compare it against the DissolveValue. If the value in the channel is less than the DissolveValue, then this pixel is excluded from rendering, otherwise it’s rendered.
DissolveValue is the value that controls the visibility of the object. This value is in the range from 0 to 1, where 0 is the fully visible object, and 1 is fully invisible (all fragments were discarded). Also, the value of any texture channel is in the range of 0 to 1.