Search Unity

CBuffer inconsistent size inside a subshader

Discussion in 'Shaders' started by sebas77, Nov 28, 2019.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    924
    Hello,

    shaderlab is still fully of mysteries for me. One thing it still not clear to me is why the subshader and passes features are so flexible/confusing.

    Now I get this message:

    UnityPerMaterial Cbuffer inconsistent inside a Subshader.

    this because I have two passes inside the same subshader, but they are used for totally different purpose (normal rendering and depth pass). Why am I supposed to have the same Cbuffer inside?
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    1,003
    Can you please report this bug? :)
    Thanks!