Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug UnityPerMaterial CBuffer inconsistent size inside a SubShader

Discussion in 'Graphics for ECS' started by Fribur, Jan 31, 2023.

  1. Fribur

    Fribur

    Joined:
    Jan 5, 2019
    Posts:
    127
    As of Unity 2022.2.3 I am getting spammed with this in a build for about half of my ShaderGraph Shader:
    Code (CSharp):
    1. A BatchDrawCommand is using a pass from the shader "NauticalGlobeShader/LineAtlasShader" that is not SRP Batcher compatible. Reason: "UnityPerMaterial CBuffer inconsistent size inside a SubShader" (<Variable name only available in the Editor>)
    2. This is not supported when rendering with a BatchRendererGroup (or Entities Graphics). MaterialID: 6 ("NauticalGlobeShader/LineAtlasShader"), MeshID: 241 (""), BatchID: 6.
    Using Entities and Entities Graphic 1.0.0-pre.15. Had none of this so far pre-2022.2.3 and there is also no issues when using play mode in the Editor. Same has been reported here.
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    335
    This is an unfortunate regression in Shader Graph, which is fixed in 2022.3.5f1. If you're blocked, it is possible to do a local workaround by editing Shader Graph package code.
     
    DreamingImLatios and Fribur like this.
  3. kite3h

    kite3h

    Joined:
    Aug 27, 2012
    Posts:
    192
    You mean 2022.2.5f1 ?
     
  4. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    335
    Yes, sorry for the typo.