stackgl / headless-gl

🎃 Windowless WebGL for node.js
1.73k stars 166 forks source link

shader #version directive compile error #290

Open exolution opened 1 month ago

exolution commented 1 month ago

my shader content is

version 300 es

attribute lowp vec4 a_vertexPosition; attribute vec2 a_texturePosition; varying vec2 v_texCoord; void main() { gl_Position = a_vertexPosition; v_texCoord = a_texturePosition; }

when i compile this shader it throws error

ERROR: 0:2: 'version' : #version directive must occur before anything else, except for comments and white space

I am sure that in the shader text passed to gl.shaderSource, there are no characters before this version directive.

army8735 commented 3 weeks ago

+1