Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    141
    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:
    352
    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:
    200
    You mean 2022.2.5f1 ?
     
  4. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    352
    Yes, sorry for the typo.
     
  5. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    298
    I am still seeing this on 2023.2.12f1 + Entities Graphics 1.2.0 + Entities 1.2.0
     
  6. hoangcuong2k1a

    hoangcuong2k1a

    Joined:
    Jan 9, 2023
    Posts:
    19
    i'm on Unity 2022.3.23f1
    DOTs 1.0.16
    and still seeing this bug. Even when i discarded changed on Git.