#StructuredBuffer is not read from when using a define in the vertex shader

1 messages · Page 1 of 1 (latest)

gritty glacier
#

Got a shader that has a StructuredBuffer set from a GraphicsBuffer. However using a define inside the vertex shader part, appears that nothing happens. The define is also used for the fragment shader and works as expected.

#
            Varyings vert(Attributes IN)
            {
                Varyings OUT;
                OUT.positionHCS = TransformObjectToHClip(IN.positionOS);
                OUT.uv = IN.uv;
                OUT.color = IN.color;
                OUT.vertexColor = float4(1,1,1,1);
#ifdef VERTEXCOLORS_ON
                OUT.vertexColor = _VertexColors[IN.vertexID];
#endif
                return OUT;
            }

fundamentally its this part, in editor nothing appears to happen with the define actually included

fierce dune
#

shader_feature_local_fragment

#

Well you set keyword variants for fragment only

gritty glacier
#

ahh