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 URP Render a single camera's view to texture/material AND screen

Discussion in 'General Graphics' started by rewn_Replay, May 23, 2023.

  1. rewn_Replay

    rewn_Replay

    Joined:
    May 23, 2023
    Posts:
    1
    Hello!
    I'm in the process making a VR tool in URP that runs both on PC and Meta Quest 2 via Steam VR, each platform being entirely connected, but having differing controls and perspectives. On the PC side, they should be able to view the VR user's view, which will be rendered to a smaller part of the screen. I am aware that you can just duplicate the VR camera (Since you cannot both output to screen and texture from a single camera) and make one of them output to a render texture, the problem with this is that we have a tight budget in terms of performance, as we have a data-heavy codebase, and somewhat complex scene, so we want to avoid rendering the scene multiple times when possible.

    So my question is how can you make a camera render either to a texture or material, while that same camera provides a screen output?

    We have looked into shader/material, renderer features and passes, CommandBuffers, among other possible solutions, but so far we have been unable to achieve the result we want.