Search Unity

Question Wrong or buggy SRP batch break description?

Discussion in 'High Definition Render Pipeline' started by EliasKremer, Oct 25, 2019.

  1. EliasKremer

    EliasKremer

    Joined:
    Oct 11, 2019
    Posts:
    3
    Hey there,

    I have problems with the batch description of the frame debugger.
    It says that the batch is broken because of different shader keywords, but the keywords are identically. Furthermore it breaks the batch because of "the material requires a device state change" which refers to the checkbox for GPU instancing (which is on).

    Am I understand this wrong, or does someone has similar issues with the SRP batcher?

    All best
     
  2. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    I guess it could be related to hardware instancing. If you draw one instance of one object and two instances of another, that theoretically would be SRP batcher compatible, one will be drawn with instancing disabled and the other two with instancing enabled. As this is a keyword change, that is not visible in the frame debugger, the error message would be correct.
    The enable instancing checkbox of the material does not enforce single instances to get a instanced draw call.
     
    Last edited: Oct 25, 2019
  3. EliasKremer

    EliasKremer

    Joined:
    Oct 11, 2019
    Posts:
    3
    I'm not sure if I understood your explanation. So it breaks the batch because of different LODs because it is a different submesh?
     
  4. EliasKremer

    EliasKremer

    Joined:
    Oct 11, 2019
    Posts:
    3
    Could you explain what else could be a not visible different shader keyword?
    I don't know why it would break the batch. There are just meshes with exact same material next to each other :/
     
  5. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Could you add screenshots of your framedebugger?