Is it possible to make transparent fog?

Hello!

I have a project in which there are objects very far away that aren’t visible when the player looks directly at them, but they are when the player looks away, like this:

(black: player, red: player’s view, green: object)


This is very annoying and so the solution that I’ve found consists on setting a transparent fog at a certain distance to the player so this “effect” isn’t noticed and the skybox is still visible.

(blue: fog)


The problem with this method is that changing the alpha channels doesn’t seem to affect the fog.

Is there a way to do this? Is there a workaround this?

Any help is appreciated!

https://catlikecoding.com/unity/tutorials/rendering/part-14/
I believe this article has the answers you seek, which is distance instead of depth based fog.