I have a game where the fog turns up to a very high density and I want some particle effects to be unaffected by this fog.
Pretty new to Unity.
Thanks in advance!
I have a game where the fog turns up to a very high density and I want some particle effects to be unaffected by this fog.
Pretty new to Unity.
Thanks in advance!
Ok try this instead(Disable your new camera and set your Main Cam back how it was before). Find your particle materials, click on the material in the particle renderer component to do this. Now change the shader on each of these particle materials(for each material in each particle renderer) to “Mobile/Particles/Additive Culled” (This shader is part of the std Mobile Assets, import if you have not already done so). Now with a bit of luck you will see your particles again.
Here is a pic of the Sparkle particle effect showing through the fog(Density set to 1(max)) with this shader applied to the Sparkle Materials :
Just an idea, but you could have another camera render the special particle effects seperately. Here’s how you would do so:
I just want to add something on Mrsoad’s comment which helped me get the same effect which is useful if you don’t have the Mobile st asset:
Create a C# script and add this to it:
using UnityEngine;
[RequireComponent( typeof( Camera ) )] public class CameraFogSetting : MonoBehaviour { [SerializeField] bool enableFog = true;
previousFogState = RenderSettings.fog;
RenderSettings.fog = enableFog;
RenderSettings.fog = previousFogState;
}
Then drag and drop this scrip on both your cameras. You can mark fog on for one camera and leave the other unmarked and viola, you can see lights and things through fog(you still have to add another layer and assign objects/lights/particles to said layer like Mrsoad said though) Hope this helps someone!