You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can include #version 300 es at the top of your shader. This means that you'll have to rewrite your shaders accordingly.
Moreover, if you don't provide your own vertex shader, then you would also need to edit dist/GlslCanvas.js.
Find this.vertexString = contextOptions.vertexString || and the string at the end should be replaced with something like: '#version 300 es\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\nin vec2 a_position;\nin vec2 a_texcoord;\n\nout vec2 v_texcoord;\n\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n v_texcoord = a_texcoord;\n}\n'.
In your fragment shader you can still access gl_FragCoord as usual, but gl_FragColor should now be fragColor if you put out vec4 fragColor; after your # defines. This works for me !
I tried #version 300 es this but didn't work
http://www.shaderific.com/blog/2014/3/13/tutorial-how-to-update-a-shader-for-opengl-es-30
The text was updated successfully, but these errors were encountered: