ConstantBuffer?

I’m trying to declare a constant buffer inside a compute shader, as specific in the beta docs and here: Unity - Manual: Built-in macros

But Unity is being all “unrecognized identifier ‘CBUFFER_START’”

Are they not supported in Compute shaders or what?

I don’t know if you got the answer to this, but you have to put it inside a CGINCLUDE/ENDCG pair.

CGINCLUDE
#include “HLSLSupport.cginc”

CBUFFER_START(MyValues)
uniform float _myvariable;
CBUFFER_END
ENDCG

1 Like