我有一个像这样的缓冲区,用它来实例化曲线几何
Distance: {
numComponents: 1,
data: new Uint8Array(0),
type: gl.BYTE , // signed byte
normalize: true,
divisor: 1
}
顶点着色器是:
#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
}
片段着色器是:
#version 300 es
precision highp float;
precision highp int;
out vec4 FragColor;
void main() {
FragColor = vec4( 1.0 , vec2(0.0), 1.0 ) ;
}
当我运行代码时,它没有给我任何错误,但只有一个警告
[.Offscreen-For-WebGL-00000200FD87E610]GL ERROR :GL_INVALID_OPERATION : glDrawArraysIntancedANGLE: vertexAttrib function must match shader attrib type
任何人都可以帮助我我做错了什么吗?
提前致谢