Search Unity

Question Shader Graph + SRP Batcher issue

Discussion in 'Shader Graph' started by OlizorBerzerk, May 12, 2020.

  1. OlizorBerzerk

    OlizorBerzerk

    Joined:
    Feb 4, 2019
    Posts:
    98
    Hello!

    I'm trying to use the SRP batcher with a shader graph. My setup is rather simple:

    My properties are a Vector2 offset, and a Matrix4 matrix. I simply add the offset to the vertex position, then multiply the result with the matrix. This is then sent to the vertex position output.

    Everything works fine with SRP batcher turned off, but when turned on it seems like the matrix and offset are weirdly shared between all the batched draws.

    Is there a way to force a property to be in the CBUFFER perDraw using the shader graph?

    Thanks!
     
  2. LagField

    LagField

    Joined:
    Nov 30, 2015
    Posts:
    4