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

How to modify normal buffer in URP (if possible)?

Discussion in 'Universal Render Pipeline' started by VictorShubin, Jan 24, 2022.

  1. VictorShubin

    VictorShubin

    Joined:
    Jan 20, 2020
    Posts:
    3
    I am using URP with differed rendering. I want to insert a pass, through "renderer feature", to modify normal buffer, BUT I have no idea how to set it up as an input, how to sample and how to write back normal buffer. I don't even know if that's possible. Can anybody point to the right direction?
     
  2. VantaGhost

    VantaGhost

    Joined:
    Jan 28, 2015
    Posts:
    2
    I also would love to know. There doesn't seem to be adequate documentation on these features that I can find
     
  3. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    631
    Hi, I think the normal buffer is a render texture called "_CameraNormalsTexture" in URP.


    In URP 12 and below, you can:

    ScriptableRenderPass.ConfigureTarget("_CameraNormalsTexture", depth buffer);


    In URP 12+, URP uses RTHandle, see the methods in URP - Change Render Target (#6 & #7).
     
    laurentlavigne likes this.
  4. customphase

    customphase

    Joined:
    Aug 19, 2012
    Posts:
    243
    fleity likes this.