test2d.vs (393B)
1 uniform mat4 uMVP; 2 uniform sampler2D uTexture1; 3 attribute vec4 aVertex; 4 attribute vec4 aTexCoord; 5 6 varying vec4 vTexCoord; 7 //varying float vChar; 8 9 const float cbw = 32.0; 10 const float cbh = 32.0; 11 12 void main() { 13 gl_Position = uMVP * vec4(aVertex.xy,0.0,1.0); 14 vTexCoord = aTexCoord; 15 16 //vChar = texture2D(uTexture1, vec2(aTexCoord.z / cbw, aTexCoord.w / cbh)).a 17 // * 255.0 + 0.001953125; 18 19 } 20