Search Unity

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:
    136
    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:
    351
    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:
    197
    You mean 2022.2.5f1 ?
     
  4. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    Yes, sorry for the typo.
     
  5. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    282
    I am still seeing this on 2023.2.12f1 + Entities Graphics 1.2.0 + Entities 1.2.0