Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Get a ScreenCopy rendertexture in a ScriptableRenderPass

Discussion in 'Universal Render Pipeline' started by Shin_S, Aug 16, 2019.

  1. Shin_S

    Shin_S

    Joined:
    Jan 22, 2015
    Posts:
    14
    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:
    14
    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.
     
  3. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    311
    Bump! I would like to know how I could create a new rendertarget buffer so I can use it to blur the screen. It's so simple with legacy rendering and here I'm really lost...
     
    rboerdijk likes this.
  4. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    545
unityunity