Sprites are ignoring global fog

I am having some trouble… I have turned on Global Fog for my game, however the sprites are appearing completely visible no matter how far you are from them. How can I make the fog affect them as well?

I tried to implement the solution found here: Trying to have sprites affected by fog without having to use default/diffuse shader. - Questions & Answers - Unity Discussions

However, it did nothing for me…


Global fog only works with objects that render to the depth buffer (that’s the only way it knows how far they are away from the camera, and therefore how much they will be affected by fog). 2d objects don’t generally do this, but it’s a trivial fix - create a copy of the Sprites shader you want to use and alter it to set ZWrite On.