- Home /
Global fog doesn't work?
Hi, I've been having some problems with the standard global fog shader.
Even though I've enabled the old fog in lighting, global fog does not show up. I've got the script in my main camera, which is tied to a standard FPS controller. What's going on here? I'm using Unity 5 personal edition.
Are the objects in your scene writing to the depth buffer? If not, the global fog won't have any effect. And you shouldn't enable the old fog in lighting - the image effect is designed to replace it.
Although, from memory in order to set the colour of the fog you need to change the colour in the old fog system, which requires it to be enabled.
Yes - if you're setting it in the inspector, you need to temporarily enable legacy fog in order to activate the colour control, after which you can disable it again. If you set the fog colour in code, this isn't necessary.
Your answer
![](https://koobas.hobune.stream/wayback/20220612100139im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Water Shader Reflection & Transparency Distance 0 Answers
Is merging this two shaders possible? 0 Answers
Default-Sprite with fog 1 Answer
Simple shader fog functionality issue 0 Answers