Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Get a ScreenCopy rendertexture in a ScriptableRenderPass

Discussion in 'General Graphics' started by Shin_S, Aug 16, 2019 at 11:19 AM.

  1. Shin_S

    Shin_S

    Joined:
    Jan 22, 2015
    Posts:
    9
    Hey there,

    I'm looking forward an efficient way to (as the title says) get a RenderTexture that contains a copy of what's rendered by the camera inside my own custom ScriptableRenderPass.

    I want to create a blur effect that's why I need this texture.

    Thank you for your help.
     
    iSinner likes this.
  2. Shin_S

    Shin_S

    Joined:
    Jan 22, 2015
    Posts:
    9
    Still looking for a solution.

    I tried to use the Blit render pass found in the LWRP-CustomRendererExamples project from @phil_lira on github, but I can't make it work properly as the Texture destination option seems to be broken :( (an issue has already been open on the repo but with no answer for now)

    Anyway I'm not even sure how this Blit feature works exactly ^^' but in the gdc talk that presents that project, the speaker (Andre McGrail) says that it's : "A pass that renders on the gpu that's going to take a shader/material and it's gonna re-render a full screen quad over the entire screen with this material/shader"
    So i thought that maybe just extracting the code that gets a texture from what's rendered could help me with that blur feature I'm trying to make.