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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Second camera using culling mask = slow frame rate?

Discussion in 'General Graphics' started by shmomo, Feb 29, 2016.

  1. shmomo

    shmomo

    Joined:
    Oct 11, 2011
    Posts:
    127
    ios performance is GOOD:
    one camera
    two objects

    ios performance is BAD:
    two cameras
    two objects
    (each camera is rendering one object by using culling masks)

    Why? I'm stuck, Any help appreciated,

    J
     
    Last edited: Mar 1, 2016
  2. shmomo

    shmomo

    Joined:
    Oct 11, 2011
    Posts:
    127
    Ok so, for future people this is the problem.

    More than one camera with any one of those cameras having a post effect = slow frame rate.

    Would love to know why.

    Thanks,

    J
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Profiler knows why.

    Generally though, each camera does all culling again from scratch. This is why multiple cameras are a bad idea, especially if you have hundreds of objects, or thousands (even if not visible, they all need to be checked).
     
  4. shmomo

    shmomo

    Joined:
    Oct 11, 2011
    Posts:
    127
    If it does, i wish it would tell me in a way i understand :)

    Only difference between 2 cams vs 1 cam is..

    one extra draw call
    one extra render render texture switch <- what does this do?

    Does this reveal anything to you?

    Thanks,

    J
     
    Last edited: Mar 2, 2016
  5. shmomo

    shmomo

    Joined:
    Oct 11, 2011
    Posts:
    127
    Wish I knew more about rendering.

    Is there some reason why using a Render Texture and Graphics.Blit in the post effect script might effect performance is your using multiple cameras?