I am trying to create a fog shader.
In the scene windows it looks like this which is more or less the intended effect. I have some errors with the cubes on the background, maybe I'm using the Screen Depth incorrectly.

But in the game view it looks like this.

Here is my graph.

I don't know why this happens, if I only use the albedo input there is no error.
Is there something I am missing?