I am getting the following error in my fragment shader:
Compile log: ERROR: 0:7: 'texture' : syntax error: syntax error
The shader is written like this:
#version 300 es
in mediump vec2 texCoord;
out mediump vec4 fColor;
uniform sampler texture;
void main(void) {
fColor = texture(texture, texCoord);
}
Why am I getting the error?