Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Two camera, one camera ignores post processing but causes fog issue

Discussion in 'Editor & General Support' started by jessee03, Jun 5, 2023.

  1. jessee03

    jessee03

    Joined:
    Apr 27, 2011
    Posts:
    729
    I have an issue where I have two camera, one is for post processing effects and the other is for ignoring post processing. Issue I run into is that the second camera that is ignoring post processing is also causing fog to be ignored for some reason. Has anyone setup this type of system before? Is this a unity bug? Is there a work around?
     
  2. Hexolenn

    Hexolenn

    Joined:
    Dec 27, 2021
    Posts:
    44
    There might be multiple reasons for this. The first reason might be that you set up the culling masks wrong upload_2023-6-5_10-0-16.png
    As you can see from this picture in the culling mask section there are your layers that the camera can see. If you forgot to add the layer that your fog is in your camera cannot see it.

    The second reason might be because of the depth of your camera when you have 2 working cameras. If you have a camera that has the depth 0 lets call this MainCamera and another that has a depth of 1 and lets call this ExtraCamera. The ExtraCamera will show what it can see OVER the MainCamera which can block some parts of your MainCamera. So if your fog is in a camera with depth lower than your MainCamera it might not be able to be seen
    upload_2023-6-5_10-7-51.png upload_2023-6-5_10-8-42.png
    As you can see I have 2 cameras with diffirent depths. In my project the BubbleCam will show everything it can see over my MainCamera because my BubbleCam has a depth of 1 and my MainCamera has a depth of -1