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

Camera render to both target texture and monitor

Discussion in 'General Graphics' started by blindmen, May 20, 2016.

  1. blindmen

    blindmen

    Joined:
    Sep 10, 2015
    Posts:
    34
    Hi there,

    is there any way how to force Camera to render to target texture and the same also to monitor?

    any ideas ?

    Many thanks.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    If you have two cameras in the same spot - one render texture and the main - you can accomplish this.
     
  3. blindmen

    blindmen

    Joined:
    Sep 10, 2015
    Posts:
    34
    Hi yes that's what I call workaround ;). I want to save performance so I'd like to use only one one camera.

    Is that an option?
     
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Yeah - it's a workaround many developers use successfully for many different reasons.
    Do you know for a fact using multiple cameras would have a meaningful impact on performance?
    @Eric5h5 commented on an old answer -
    "There's overhead in having additional cameras, but it's minimal and unlikely to have any real effect on speed."

    For me personally a workaround is something that gets the job done - :) I'm not able to say if using one camera is an option here. Please update with your findings.
    Just remember - if (a workaround) accomplishes the goal successfully the end user doesn't care how it works - as long as it works. ;)
     
  5. blindmen

    blindmen

    Joined:
    Sep 10, 2015
    Posts:
    34
    Hi there, from where is a quote that it has minimal impact on performace?

    Thanks
     
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
  7. blindmen

    blindmen

    Joined:
    Sep 10, 2015
    Posts:
    34
    :) do not have a real problem with it at the moment .. therefore do not spend too much time looking for answers :)
     
  8. Mario8664

    Mario8664

    Joined:
    Dec 10, 2017
    Posts:
    2
    But if the UI is in camera space, another camera will not render it even it's in the corresponding layer.
     
    supguys and tektonspace like this.
  9. mohammedshetaya

    mohammedshetaya

    Joined:
    Feb 3, 2022
    Posts:
    8
    Have you found a solution for this problem? I am facing the same situation