Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Camera with custom viewport is not rendered

Discussion in 'Editor & General Support' started by Jan-Vrabel, Feb 26, 2021.

  1. Jan-Vrabel

    Jan-Vrabel

    Joined:
    Oct 24, 2015
    Posts:
    5
    Hi guys, I have a problem with camera (custom values in viewport are used) of which content is not rendered on OSX (Big Sur). This is happening if there is another camera with bigger depth value (e.g. used for UI rendering with "Depth only" clear flags). I am not able to find any workaround how to solve this problem with custom viewport which I want to render "behind" any other camera. This behaviour is 100% reproducible:

    1) create new empty scene (default Main Camera with depth -1 is already there)
    2) change viewport rect of Main Camera (I changed height from 1.0 to 0.5)
    3) create second camera (by default depth should be 0) and set clear flags to Depth only, culling mask to UI
    4) create UI canvas with some element - button, image etc.
    5) set render mode of created canvas to Screen Space - Camera and assign second camera as canvas rendering camera
    6) run on editor -> everything is rendered (UI first and after that 3d scene)
    7) create build for osx (in my case Big Sur), run it -> only UI is rendered with black background without anything from 3d scene (which should be rendered by Main Camera)


    what can I see in editor is (also in play mode - works also on windows and iOS):

    upload_2021-2-26_16-39-12.png


    what is really rendered on OSX (Big Sur):

    upload_2021-2-26_16-40-12.png


    Setup:

    OS - macOS Big Sur 11.1
    Unity 2020.2.1f1
    MacBook Pro 2016, Intel Core i5, 16gb ram

    And in project:
    upload_2021-2-26_16-56-6.png
     
    Last edited: Apr 13, 2021
  2. Jan-Vrabel

    Jan-Vrabel

    Joined:
    Oct 24, 2015
    Posts:
    5
    same on 2020.2.6f1