Search Unity

Single-pass RenderTexture target

Discussion in 'VR' started by dnnkeeper, Sep 20, 2020.

  1. dnnkeeper

    dnnkeeper

    Joined:
    Jul 7, 2013
    Posts:
    84
    I'm trying to implement portal rendering system for VR (using XR Management package and Unity 2020.2). So I need to create a portal camera and render it to the target texture, then sample from it using stereo shader. But I didn't manage to make stereo camera render to the target texture properly. Only one eye is rendered despite VRTextureUsage.TwoEyes texture descriptor. I'm using built-in render pipeline.

    Is it possible to render an arbitrary camera with single-pass stereo mode to the target texture and receive a proper texture for both eyes which can be sampled later? Is this possible with SRP/URP/Built-in?