Skip to content

Instantly share code, notes, and snippets.

@ThePhiMa
ThePhiMa / Blend Add Particle.shader
Created August 18, 2016 12:45
Blend Add Shader (as used in Diablo 3)
// Blend Add Shader (as used in Diablo 3)
// Uses the alpha channel to determine if the pixel needs to be blended additively or by transparency.
// Is a good way prevent the additive buildup that makes a scene with a lot of particle effects white and unreadable while still having some particle texture features.
// Idea by Julian Love - http://www.gdcvault.com/play/1017660/Technical-Artist-Bootcamp-The-VFX
Shader "Custom/Blend Add Particle Test"
{
Properties
{
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
_BlendThreshold("Blend Treshold (0.0:Additive, 1.0:Trasparency)", Range(0.0, 1.0)) = 0.5