Webgl shader attrib type not matched

164 Views Asked by At

I have a buffer like this use it in instancing of a curve geometry Distance: { numComponents: 1, data: new Uint8Array(0), type: gl.BYTE , // signed byte normalize: true, divisor: 1 }

vertex shader is:

#version 300 es

precision highp float;
precision highp int;

in  vec2 Pos;
in  vec2 Center;
in  mat2 Rotate;
in  float Length;
in  float Size;
in  float Distance;

uniform float zoom;
uniform vec2 scale;
uniform float ratio;
uniform vec2 resolution;
uniform vec2 move;

void main() {        
    // setting the gl_Position
}

and Fragment shader is:

#version 300 es

precision highp float;
precision highp int;

out vec4 FragColor;

void main() {
    FragColor = vec4( 1.0 , vec2(0.0), 1.0 ) ;
}

when I run the code it give me no error but just one warning which is

[.Offscreen-For-WebGL-00000200FD87E610]GL ERROR :GL_INVALID_OPERATION : glDrawArraysIntancedANGLE: vertexAttrib function must match shader attrib type

can any body help me what am I do wrong?

Thanks in advance

0

There are 0 best solutions below