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 Renderer with different resolutions on same camera

Discussion in 'General Graphics' started by Hedenrag, Mar 4, 2023.

  1. Hedenrag

    Hedenrag

    Joined:
    Mar 8, 2022
    Posts:
    5
    My goal is to have a 3d scene where i can render some objects in one resolution and other objects in another.
    My solution was to have two cameras, one rendering at a low res and the other at the current screen res then compare the depth of the rendered images and output the desired image. The problem is im not able to get the depth of the cameras into a render texture.
    Does anyone have a solution to this?
     
  2. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    960
    This will pretty much walk you through the process. I'll warn you. It's not gonna be easy.
     
    Neonage likes this.
  3. Hedenrag

    Hedenrag

    Joined:
    Mar 8, 2022
    Posts:
    5
    Thank you, that was exactly what i was looking for. I first discarded it since i didnt wanted to get involved with srp, fortunately the author linked the repository.
     
  4. Sluggy

    Sluggy

    Joined:
    Nov 27, 2012
    Posts:
    960
    I understand the trepidation. SRP has come a long was and I think it's actually in a decent spot finally as long as you aren't relying on the few remaining features that BiRP might have that the other two don't. The biggest thing probably holding it back for many now is simply the lack of the massive pool of shaders that BiRP has to choose from. But if you are like me and don't need anything specific or were going to roll your own anyway then one of the SRPs is a decent choice.