Search Unity

Any way to improve render performance (for lower quality) on a second camera?

Discussion in 'High Definition Render Pipeline' started by dgoyette, Dec 25, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I use a second camera in my scene to output to a render texture, and I show the content in the corner of the screen. Even with no post processing or anything fancy on that second camera, it has a significant impact on framerate when it's enabled. With just the main camera rendering at 1920x1080, I'm getting 120-130 FPS in a test scene. When I enable the second camera, it drops to about 80-90 FPS. Some details:
    • I've turned off all global volumes, so the second camera is as bare-bones as I can make it.
    • The second camera only uses a single layer for culling
    • It's rendering into a 512x512 render texture. But I've dropped that to 16x16 for testing with no improvement to performance.
    • No anti-aliasing or other effects/post-processing on the camera
    I understand that rendering a camera isn't a trivial thing. But I end up intentionally distorting this render texture later, to give it a poorer quality, and I'd be fine with a lower quality render, if possible. Anyway, it's probably not possible, but I wondered if there was anything else I could do to get a fairly cheap render off the secondary camera (without affecting the main camera.)
     
  2. laurent-h

    laurent-h

    Joined:
    Sep 29, 2016
    Posts:
    78
    Hi,
    You can toggle "custom frame settings" on your secondary camera in order to disable the features you don't need for that camera.
    This will allow you to override the default camera settings.
    Check the box on the left of a field to enable the override, and change the value on the right to set the desired value.
    upload_2019-12-31_9-54-27.png
     
    dgoyette and eizenhorn like this.
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Wow. That's perfect. I haven't seen that before. Thanks so much.