3 ms·
Wow, the code for fragment shaders looks quite different than WebGL 1... does anyone know a good reference for seeing what's new or changed? I notice that one o
by mrspeaker 9y ago
Wow, the code for fragment shaders looks quite different than WebGL 1... does anyone know a good reference for seeing what's new or changed? I notice that one of the shaders has `if (texelCoord.x > 0) {...}` are `if` statements handled better in WebGL2?
- krona 9y agoThe biggest change in WebGL2 is probably the shader language from 100 to 300 es. I found this document instructive: https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl2.html https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl...
- pjmlp 9y agoYes, WebGL 2 shaders are OpenGL ES 3.x ones, which have some breaking changes in regards to version 2.0. http://www.shaderific.com/blog/2014/3/13/tutorial-how-to-update-a-shader-for-opengl-es-30 http://www.shaderific.com/blog/2014/3/13/tutorial-how-to-upd...