Just a quick question: I’m playing around with the Unity Particle System and trying out how things work out. Unfortunately, right at the beginning I came into a problem:
Yeah, that’s the problem right there I have no idea which particle shader does what, what is its use case etc. I searched for some documentation in official Unity docs, then in the Web, nothing!
Can anyone provide me a link or any resource that will explain the usage of these different shaders?
I am not aware of any unity specific documentation for the particle shaders.
However, I can explain to you what they do in general.
Compared to the other shaders, they usually apply the vertex color (so each particle can be colored individually). They optionally also apply the ‘soft particles’ effect using the scene depth, smoothing the edges where particles get occluded by opaque geometry.
All those shader you see there differ mostly by the blending mode (how the result is written do the target buffer (texture/screen). Additive, AlphaBlended and Multiply are probably the most common blending techniques. Those are all features of the GPU itself, and you can find some information on the blending on the unity docs HERE as well.
Basically, these are
Alpha blended: Does a linear interpolation between the particle output and original screen content based on the particle’s alpha output (alpha 0 means the screen is intact, alpha 1 means the full particle color is written, alpha 0.5 means that half of each is added together.
Additive means the particle output color is added the original screen content, making it always brighter (unless the particle, with a special shader, outputs a negative color). Outputting black means no effect on the screen (alpha ignored)
Multiply, predictably, means the particle output is multiplied with the screen content. This means that outputting 1 (white) will have no effect, and 0(black) will result in black color on the screen.
It’s up to you how you will utilize these. Additive is used mostly for ligting / fire / flare effects. Multiply cn be used for black smoke, but so can be the alpha-blending, which is better at reproducing the particle color closer to the particle texture.
You can write custom particle shaders if you need some other blending to create custom special effects.
I hope that helps