Hi everybody! I've been making up a few community requested shaders and effects over on Discord, so here's a quick update for those of you who missed them but wanted to have a look. If you aren't on Discord already, head on over, I'm almost always there to answer questions, and to work up quick shader examples like these. I love requests, hit me up!
--------------------
First up, using stencils to mask particles so they always stay behind a mesh, in order to create a 'particle outline' around a figure (see title GIF). There are absolutely more performant ways to achieve a similar effect, but it's a good trick to have up your sleeve just in case.

--------------------
Next is adding striations to a rock material based on world height - and also using a script to write a gradient to the shader for extra control.

Amplify Shader Editor *does* have a gradient node you can use, which is very convenient, but it's something you have to set in the shader and can't be customised per material (afaik).
--------------------
Finally, a fake Fog Volume, using a similar depth fade approach as the silhouette portals from earlier, but this time on a nice wobbly cube. It breaks if you go inside the fog, but works well for external viewing.

--------------------
Also, we worked out (or remembered) that you can send the particle centre position to a particle stream (via "Custom Vertex Streams") in order to convert shaders over to use with particles. Shaders that would normally use the object position or local vertex position won't work properly on individual particles, as they use the Particle System's pivot as the object origin for all the particles drawn. So turn on Custom Vertex Streams, send over "Centre", and pipe it in with the appropriate texture coordinates to get individual particle centres.

Here it is working with depth mapped raindrops. That can be a bit confusing, so if anything doesn't make sense, let me know on Discord and I'll go through it more thoroughly.
--------------------
SNEAK PEEK: here's an early look a new effect I'm working on - more fluffy clouds, but this time *performant* and thick ones using post processing on geometry. No animation yet, this gif is just focusing on the fluffy.

The idea is that you should be able to use a mesh particle system of spheres and they'll blend together properly - or sculpt up a custom cloud shape. It won't be able to be used for wispy smoke or transparent clouds, but anything thick and puffy should work. The basic idea is taken from Sea of Thieves, and I'm guessing that the game Sky uses a similar approach too.
Here's where I got the idea from: https://youtu.be/KxnFr5ugAHs?t=1573
There's still some cleanup to do, so it's not quite ready, but as soon as it's out of the oven I'll plate it up.
PS: The Toonfire shader has also been backported to Unity 2017 to solve a prefab issue, (2017 is needed for VR Chat at the moment apparently). So if it wasn't working for you, give the 2017 version a try instead. Those files are available with the original post here https://www.patreon.com/posts/toon-fire-files-21988132
UPDATE: I've made some improvements to the Gradient Generation script. It can now create larger gradients, change the filter and wrap modes, and also write the gradient to file. Grab the "GenerateGradient.cs" file below.

Aadit Doshi
2019-09-17 08:25:28 +0000 UTC