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. Dismiss Notice

Question How to Blit and access RenderTargets in URP 13+?

Discussion in 'Universal Render Pipeline' started by DrViJ, Mar 27, 2022.

  1. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    154
    Hi! can anybody help with understanding of the canonical and correct way of how to use render features in URP 13+

    1) I see recommendations not to use cmd.Blit() in documentation. What is correct alternative? Is it Blitter class or draw fullscreen mesh with cmd.DrawMesh(). Are there any examples of these concepts?
    2) The example in documentation has a string:
    Code (CSharp):
    1. m_RenderPass.SetTarget(renderer.cameraColorTarget, m_Intensity);
    Compiler tells us that cameraColorTarget is obsolete and recommends to change it to cameraColorTargetHandle. But propagates errors too:

    Code (CSharp):
    1. You can only call cameraColorTarget inside the scope of a ScriptableRenderPass.
    2. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
    Should I send ScriptableRenderer to ScriptableRenderPass and call cameraColorTargetHandle from there?

    Thanks for any help with understanding of new concepts :)
     
  2. goncalo-vasconcelos

    goncalo-vasconcelos

    Joined:
    May 24, 2017
    Posts:
    8
    DrViJ likes this.
  3. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    154
    Thank you for the link! I will read it today! I think we, Unity users, should try to write something like unofficial documentation for it and help Unity Team :)
     
    Walter_Hulsebos likes this.