I am trying to add a new column ‘extra’ to the vertex, color, texcoord GeomVertexArray in order to add new information about the vertex…
array = GeomVertexArrayFormat()
array.addColumn("vertex", 3, Geom.NTFloat32, Geom.CPoint)
array.addColumn("color", 4, Geom.NTFloat32, Geom.CPoint)
array.addColumn("texcoord", 2, Geom.NTFloat32, Geom.CPoint)
array.addColumn("extra", 4, Geom.NTFloat32, Geom.CPoint)
format = GeomVertexFormat()
format.addArray(array)
vaf = GeomVertexArrayFormat()
vaf.setDivisor(1)
vaf.addColumn("xyzh", 4, Geom.NTFloat32, Geom.CPoint)
format.addArray(vaf)
When I try to use the in vec4 extra; within vertex shader, it looks like it is behaving like a instancing variable… which I do have enabled but is in a separate vertex array…
in vec4 vertex;
in vec2 texcoord; //L1
in vec4 color;
in vec4 extra; //L2
in vec4 xyzh;
Also, i noticed if I swap L1 and L2, the variable extra works like a vertex attribute but the texcoord seems to be set to 0…