Need a static fog solution

Hi, we’re having trouble working on a solution to hide the edges of the terrain, via a fog system so when the free roaming camera moves towards the edge, you do not see the edge of the terrain. We’ll be restricting the camera from moving too close to the edges, but as the camera can rotate 360deg, player can still see the edges of the terrain stopping very suddenly. Looking for a solution such as static fog to sit around the edges, as opposed to Unity’s built in fog which is distance-based from the camera, so when you move towards the edges of the terrain, the fog moves back too. Need something similar to the attached picture, that stays still. So you can see the enviroment fine, but when you get close to the edges, it gets very foggy as shown.

Already tried linear, exp2 and global fog, all move with the camera. Global fog would be good if it didn’t move with the camera. Particle systems seem too expensive on the frames per sec, so not sure if that is an option.

Any help much appreciated!

Are you using Unity’s built-in terrain system, or are these terrain meshes that you’ve got shader control over?

We’re using the built-in terrain system - and this is for a RTS game so will be zoomed out a bit more than a normal FPS style game, which is why we need a solution to hide the edge of the terrain…
thanks

Hmm. Well, the ideal solution would be to modify the shader to ‘force fog’ the terrain near the edge - fog is just fading the pixel to a constant colour, so it’s easy to implement - but as far as I know, modifying the shader used by Unity’s terrain system is something of an undertaking.

Have you tried just rendering a semitransparent quad over each edge of the map, textured with a ‘fade in’ to the fog colour, to see how it looks?