GLSL multi is identical to the GLSL TOP, except it allows for more than 3 inputs.
GLSL top is simply 2D image generation, shadertoy style.
GLSL Mat is the material, which is a bit different, as it works in the vertex > geometry > pixel pipeline, and basically constructs the material in the shader.
You can use the same code from a GLSL top in a GLSL material pixel shader, as they are similar. But better to keep them separate, and use the top as an input into your material.
TAS is crazy good. So, a big part of the trickery there is that the displacement is not going in just one direction. In most displacement setups, the vertex shader move its vertex in the direction of its normal, by the amount based on its color value.
In the vertex shader, only one vertex is processed at a time, as the shader only knows about one vertex (all the others are being processed simultaneously on another thread in the gpu).
Each vertex has these attributes, which are global variables (the are declared for you).
P - world position
N - normal (direction the vertex points toward, ie outward, used for rendering smooth surfaces).
UVs (vUV.st is how you reference this)
Color - the vertex color
So in displacement, the vertex is moved in the direction of the normal, by the amount of the color.
The trick TAS does to get those nice drops, is to alter the normal, so that displacement can occur in a direction other than just straight up. By altering the normal, you can displace in wacky directions, and get that droplet or mushroom curl displace effect.
My example does have a normal texture input that you can use to alter the direction of displacement. It’s kind of mind bending, but you are almost there.
If you follow along with MR’s tutorial, he explains how to get the surface to render properly so that the shading looks right. This has to do with calculating the vertex normal attribute AFTER displacement occurs. It’s a long tut, but totally worth understanding. Thank you MR!!
Also, if you want to dig deeper into understanding glsl tops, shadertoy style, I highly recommend the Art of Code series on youtube.
[url]https://www.youtube.com/channel/UCcAlTqd9zID6aNX3TzwxJXg[/url]
It really helps with the mental gymnastics of UV manipulation as painting.