Disabling Fog for 1 Camera?

For optimization reasons I have set my Camera culling quite low, its at night and darkness hides this. Its set to 150.

To hide the cutoff, I use quite a high fog amount in Render Preferences.
However, I DO have a skybox I would like to see, AND a moon, that is a simply lit plane in the sky. However these are hidden by the fog too!

Is there a way to have a second camera with a high culling amount, that ONLY renders FAR objects, but that ISNT affected by the fog setting? That way I can still have a low distance set on my main camera, (that shows buildings character and trees and environment) and a high distance set on the SKY-CAM.

Any suggestions for alternative solutions welcomed!

MArk

This helped me out tremendously:

http://answers.unity3d.com/questions/11100/is-it-possible-to-disable-fog-on-a-per-camera-basi.html

Also, here: which is the source to the answer above:

http://wiki.unity3d.com/index.php?title=Fog_Layer

I have a friend that was having this problem too with latests Unity versions and URP.

Here is a script i wrote for him, it will work if you are using the “Fog” on the “Lighting settings”. If you are using an asset like “Enviro Weather” i’m pretty sure the fog there should have a layer setting.

For this script to work, you have to set the camera that you don’t want to render the fog. You don’t need to attach this script to a camera, but you can if you want, just remember to assign it.

using UnityEngine;
using UnityEngine.Rendering;

public class NoFog : MonoBehaviour
{
    public Camera cameraWithoutFog;

    private void Start()
    {
        RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering;
    }
    void OnDestroy()
    {
        RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering;
    }
    void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera)
    {
        if (camera == cameraWithoutFog)
            RenderSettings.fog = false;
        else
            RenderSettings.fog = true;
    }
}