Making Hit/Explosion Particle Effects with custom particle shaders

I was making new Hit Particle Effects for Astro Kat and wrote 2 new particle shaders for it that I wanted to share with you today. 

They both dissolve over Particle Lifetime, just like the Fire Particle shader I made before, One takes a sprite as a mask, the other should be used on a sphere and creates spikes via vertex manipulation

Again, like in the Fire effect post, you need to turn on Custom Vertex Streams, and add Lifetime > AgePercent to read the particle lifetime, this value is stored in TEXCOORD0.z

Mask Dissolve

This is a pretty basic particle shader, using smoothstep to dissolve the particle over the particle age, using noise textures.

Step by step

So what's happening in this shader is that two noise textures are added together, then a smoothstep happens, then colors are added afterwards, and the whole result is multiplied by a mask texture.

Shader Code : PasteBin Link (Comments on all the fragment lines that tell you what they do)

Spike Sphere Dissolve

The spikes are 3D :D

This particle shader uses vertex displacement to create dynamic spikey spark shapes without needing special textures. For it to work you need to use it on a Sphere Mesh

Step by step

We use a noise texture in the vertex function to base the spikes on, then cut off the spikes so its sharper, the colors and dissolve are the same as the masked particle shader, apart from the mask :)

 Shader Code : PasteBin Link   Again with Comments

Explosion Breakdown

I'm using both for this explosion effect 

Here's the setup of the particle system!

There are 7 particle systems and one point light, 6 materials, using the 2 shaders above, and the standard built-in particle shaders.

I can't do thumbnails/ link through images on Patreon so the full images of the setups are linked in text


Built-in Standard Particle shader

The important parts here are stretched billboard in Renderer to make the round particle appear longer, and the sphere shape the particle are spawned from, making them align to the spherical direction

Link to full Sparks Settings Image 


Built-in Standard Particle shader 

Just a simple single particle with color over time

Link to full Glow Settings Image  


 Spike Sphere Dissolve Shader

The impact effect from the spikey shader, most of the effect is done within the shader, so the settings are pretty simple. The most important part is using a Sphere Mesh instead of a billboard

Link to full Spikes Settings Image  


Mask Dissolve Shader

Using the Mask Dissolve with a very thin circle texture

Link to full FireCircle Settings Image  

Using just the Sparks, Glow, Spikes, and FireCircle you can make impact/ hit effects :)


Mask Dissolve Shader 

Spawning a few particles here that dissolve with the Mask Dissolve shader, they have a longer lifetime than the other particles so the dust/smoke lingers

Link to full Dust Settings Image  


Mask Dissolve Shader  

For a more intense effect there are some very bright dust particles that are almost the same as above, only stick around a bit shorter

Link to full FireDust Settings Image  


 Built-in Standard Particle shader  

Finally some debris chunks on a the built in shader that shoot out from the explosion, settings very similar to the sparks, without the streching billboard

Link to full Chunks Settings Image  

All at once if it's more convenient >  Link to all Settings Image  

Textures to play with

Set Alpha to Grayscale on import for these V

Have fun~!

Become a patron to

Unlock 122 exclusive posts
Be part of the community
Connect via private message