Particle System effect fog resistant in Solomon Snow — First Contact game.
As we can see here, we use the fog to nicely blend the background of the entire level. Emitting stars under the “You have reached level” are a special effect of Particle System with a custom shader based on Mobile/Particles/Additive.
The solution is very simple. You can make your own shader based on the original with a little change. Here are the steps:
Unpack and find your shader, in our case it was builtin_shaders/DefaultResourcesExtra/Mobile/Mobile-Particle-Add.shader
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)// Simplified Additive Particle shader. Differences from regular Additive Particle one: // - no Tint color // - no Smooth particle support // - no AlphaTest // - no ColorMaskShader "Mobile/Particles/Additive" { Properties { _MainTex ("Particle Texture", 2D) = "white" {} }Category { Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" } Blend SrcAlpha One Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }BindChannels { Bind "Color", color Bind "Vertex", vertex Bind "TexCoord", texcoord }SubShader { Pass { SetTexture [_MainTex] { combine texture * primary } } } } }
Duplicate this shader, change file name for-example to AdditiveDisabledFog.shader and inside code change to Shader “Mobile/Particles/Additive”. Save it!
Now open duplicated shader file, try to find Fog { Color (0,0,0,0 } and change it to Fog { Mode Off } like this:
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Simplified Additive Particle shader. Differences from regular Additive Particle one: // - no Tint color // - no Smooth particle support // - no AlphaTest // - no ColorMask
Category{ Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" } Blend SrcAlpha One Cull Off Lighting Off ZWrite Off Fog { Mode Off }