Search Unity

Feature Request URP v12: allow users to prime the normal buffer before gbuffer

Discussion in 'Universal Render Pipeline' started by bitinn, Oct 7, 2021.

  1. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Hi,

    Currently with URP v12, there is no way for users to specify a custom object should render into normal buffer when they are filtered in the URP renderer.

    URP v12 does render a depth normal pre-pass if it sees an object with complex material like Clear Coat, BUT users cannot force it on objects that rendered through Renderer Feature (or Scriptable Render Pass).

    We would like to have that option, as DepthNormalOnlyPass are lockdown as internal, there is no way to do it beyond changing the package source.

    Please enable us an option to do that without forking URP.

    Thx!
     
    Oxeren likes this.
  2. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    A update on this:

    This is possible via a custom Scriptable Render Pass, I ended up duplicating code from DepthNormalOnlyPass.

    One thing I should note is, somehow I didn't have to call
    cmd.GetTemporaryRT
    and
    cmd.ReleaseTemporaryRT
    in my custom render pass.

    If I call them then Deferred Pass are no longer able to bind the normal gbuffer. (even funkier is SSAO pass somehow can).

    No change to URP package code was necessary.