[]2d 自定义shader

如何给v_testValue 赋值
//顶点着色器程序和片元着色器程序。
            let vs: string = `attribute vec2 position;
            attribute vec2 texcoord;
            attribute vec4 color;
            uniform vec2 size;
            uniform mat4 mmat;
            varying vec2 v_texcoord;
            varying vec4 v_color;
            varying float v_testValue;
            void main(){
                vec4 pos =mmat*vec4(position.x,position.y,0,1);
                gl_Position = vec4((pos.x/size.x-0.5)*2.0, (0.5-pos.y/size.y)*2.0, pos.z, 1.0);
                v_color = color;
                v_texcoord = texcoord;
            }`
已邀请:

Aar0n

赞同来自:

写shader不在服务范围内。

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作