Open SET001 opened 3 years ago
I had the same issue, the variable name you are looking for is v_texcoord
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_texture_0;
varying vec2 v_texcoord;
void main(){
gl_FragColor=texture2D(u_texture_0,v_texcoord);
}
I had the same issue, the variable name you are looking for is v_texcoord
I can confirm. Using v_texcoord
(instead of a_texcoord
) inside the fragment shader works fine. a_texcoord
is probably only available in the vertex shader and passed through to v_texcoord
there to be available in the fragment shader.
in this simple example:
as soon as I uncomment the first line of the main, I'm getting this error:
Load error: "TypeError: Cannot read property 'replace' of undefined"