Search Unity

Command buffer set render target broken in URP 12

Discussion in 'Universal Render Pipeline' started by jjxtra, Nov 18, 2021.

  1. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    In URP 11 I could use a command buffer and set the render target and it would set the render target. In URP 12, it seems to do nothing for a set render target command and keeps whatever the current render target is.

    Anyone else running into this or know a work-around?
     
  2. peterbay

    peterbay

    Unity Technologies

    Joined:
    Nov 2, 2017
    Posts:
    100
    Is this from a ScriptableRenderPass? In that case, you should use ConfigureTarget instead.
     
  3. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    It is for my scriptable render pass. I have tried configure target with no luck. I also have complex command buffers that use multiple render targets. These cannot use configure target because they don’t have access to the scriptable render pass.
     
  4. peterbay

    peterbay

    Unity Technologies

    Joined:
    Nov 2, 2017
    Posts:
    100
    Can you post an example of what you're doing? If you'd like to keep it private, you can open an issue with an example project.
     
  5. weiner_monkey

    weiner_monkey

    Joined:
    Aug 1, 2022
    Posts:
    49
    This is still an issue in URP 12, 2021.3 LTS. When assigning multiple render targets via ConfigureTarget or via CommandBuffer.SetRenderTarget, it always defaults to the camera target. Single targets work fine however
     
    ElliotB likes this.