3
\$\begingroup\$

Short question, what's the difference between the shaders used for particle, and how they affect the visual.

Additive
Alpha Blended
Unlit
Lit

\$\endgroup\$
1
  • \$\begingroup\$ Have you tried making a particle system with each one to see for yourself? \$\endgroup\$ – DMGregory Jun 28 '18 at 13:48
5
\$\begingroup\$

"Lit" shaders are affected by lighting in your scene. So your smoke plume may be bright where it wafts through the cone of a street lamp, and dark where it passes into shadow.

Lighting calculations considerably increase the complexity of drawing the particles, so for many effects we'll prefer to use "Unlit" shaders, to skip the expensive lighting calculations and just draw the same particle appearance regardless of surrounding light and shadow. This works well for ethereal, magic, or explosive particle effects that aren't visibly affected by light sources, or for effects that are only ever shown in a single lighting environment so we can tune the parameters to match that one context.

"Additive" blending means that we compute the colour of the particle over the colour of the background scene behind it by adding the two colours. So a red particle over a green background becomes yellow. This is suitable for glowing effects like fire or sparks or magic energy, since the result is always as bright as the background or brighter. A black particle won't change the background at all (x + 0 = x). Against very bright backgrounds though, these effects can get washed out, since there's not much headroom to add more brightness. An advantage of additive blending is that it's order-independent. The results of a stack of additive blended effects will be the same without sorting, and you won't see popping as the order changes.

"Alpha Blended" means that the colour of the particle over the colour of the background scene behind it is computed by taking a weighted average (or "lerp" linear interpolation) of the two colours, using the opacity alpha value of the particle. This is often called "standard" or "layer" blending, and it can represent solid or dark materials. Unlike additive blending, this one is order-dependent, meaning that you need to sort the particles to get a consistent appearance, and you can sometimes see popping if the order changes.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.