[Feature Request] Fog Color as background in Unity5

One feature that I’ve always wanted in Unity since Unity 3 is having it where the color of the fog is the skybox’s background. Essentially the transparency of the far objects fades out. When you use Unity’s new Procedural Skybox material, you’ll notice fog always looks bad because it doesn’t actually blend into the horizon. A way to work around this is make a skybox with the horizon simply as one color and match the fog color exactly as so. This makes the procedural skybox useless in my opinion. If we could have fog that matches the background so it blends in perfectly with the horizon… that would be AMAZING. It doesn’t seem too difficult either.

Thanks :slight_smile:

Yes I agree that the fog system in unity needs some work, especially when it comes to large outdoor scenes. It would be nice to have things such as height based fog to really bring out the sense of scale and altitude in such scenes, using it to add to the atmosphere instead of just using the fog to hide flaws in the render distance.

As for the background fade, that could be achieved by rendering the scene and the background to separate render targets without fog. Then you could Lerp blend the two together by distance taken from the depth buffer in a post processing shader. I have a feeling that it might introduce some artifacts and sorting problems with alpha transparency. Even though that is not the most physically accurate representation of how fog works, it would be a fair trade-off to get rid of those unpleasant harsh edges.