Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

SRP Batching works for opaque pass but fails for shadowmap (Different Shadow Caster Hash)

Discussion in 'Universal Render Pipeline' started by lassade, Nov 1, 2020.

  1. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    127
    Hello there,

    I'm current have a shader "writen" using the Amplify Shader Editor for the URP, this shader is SRP Bacher compatible and I can get it to batch my opaque pass, but not in the shadowmap pass:

    1.png

    My problem is with the ShadowLoopNewBacher.Draw, which isn't batching at all; See more bellow;

    2.png

    Each object have a different _Color attribute and a _Anchor attribute;

    Any ideas of how get the shadow caster to batch?
     
  2. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    127