Search Unity

Question Undocumented node in ShaderGraph for URP 2022.2 what does it do?

Discussion in 'Universal Render Pipeline' started by TheCelt, Dec 8, 2022.

  1. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    So this node seems to now exist in Unity 2022.2:

    upload_2022-12-8_23-38-53.png

    But what does it do? I thought it got the normals from the world in the same way it gets depth values from the world but placing it into colour output i just get all black. There's no mention of this node any where in the documentation for 2022.2 and it didn't exist prior to that.

    So what is it ? What does it do ? How do i get it to work ?
     
    Last edited: Dec 8, 2022
    Nexer8 likes this.
  2. wwWwwwW1

    wwWwwwW1

    Joined:
    Oct 31, 2021
    Posts:
    769
    Hi, I think I can roughly explain it.

    URP Sample Buffer Node:
    • Blit Source: Sample a global texture called "_BlitTexture", which I think is designed for URP full screen pass renderer feature (a "CopyColor" right before the effect, see the Color requirement).
    • NormalWorldSpace: Sample scene normal texture (GBuffer if Deferred path).
    If URP does not enqueue DepthNormalsPrepass (see Frame Debugger), this will return black color.
    To make this node work, try enabling SSAO (DepthNormal mode) or adding a special empty renderer feature mentioned in this thread.

    If you are using Deferred rendering path and trying to access it in a regular shader (attached to a scene mesh), this node may be useless because the scene normal (GBuffer) hasn't been rendered at that time.​
    • Motion: Sample the Motion Vectors texture.