I get this random glitch whenever i turn on the default fog in my scene. How would i fix it?

I’m not really sure why the default volumetric fog is causing this to happen. All I know is that whenever I turn of the fog in the post processing settings the glitch stops occurring.

[EMBEDDED IMAGE]

[DIRECT LINK TO IMAGE]
https://cdn1.bbcode0.com/uploads/2021/6/23/9b24e1b838e8617fdd6712ec8e15e6c0-full.png

The images are not visible (if there were more than one)

I can’t really understand what glitch you mean by just seeing one image.

Here’s a better look into the glitch.
https://www.youtube.com/watch?v=2QLYIu17flc

If disabling fog stops all this then It looks like the material on those objects have not implemented unity’s fog shader code. (I’m not a graphics programmer so this is just a guess)

2 Likes

You could see if using a Shader Variant Collection helps - it’s possible materials are pink only when fog is enabled because the specific variant isn’t being included for whatever reason. To create a variant collection, enter Play Mode and toggle your settings like fog and at the bottom of Project Settings->Graphics you can see the number of shaders and total variants next to “currently tracked” goes up as they get used in the scene. Then once you’re sure you’ve got them all added, click “save to asset” and drop that into the “Preloaded Shaders” list.

2 Likes