Understanding Shaders - Promethaes/Game-Programming-Compendium GitHub Wiki
I'm investigating this because while I understand very many things about how graphics in general are all put together, I'm actually not that adept at making good looking shaders. I will research a few effects, all of which will be in Unity's Shader Graph to make things simple, and I'll post their graphs and what each stage of the effect is contributing to the final look.
Brackey's Forcefield Effect
Found some stuff here This shader can be broken down into 3 steps:
- Scrolling texture
- Fresnel effect on alpha channel
- Geometry intersection added to alpha channel
While the first two are generally self explanatory (tiling and offset node, fresnel node), geometry intersection is a little harder for me to understand. In a nutshell, the screen depth of the object is taken in eye space and the raw screen position is subtracted from it. This is a cheap way to get the proper value along the view direction of the camera. Then, the result is one minus'd to give the illusion of intersection.
Essentially, the alpha value of the object is being interpolated based on the position of the particular fragment relative to the camera. That interpolation is inverted to produce the effect.