-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Issue description
The GLSL 100 shaders do not compile in a web build. The errors are:
WARNING: SHADER: [ID 21] Failed to compile vertex shader code
game.html:1 WARNING: SHADER: [ID 21] Compile error: ERROR: 0:3: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:4: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:5: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:6: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:7: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:14: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:15: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:25: '1.0f' : Floating-point suffix unsupported prior to GLSL ES 3.00
game.html:1 ERROR: 0:25: '1.0f' : syntax error
game.html:1
game.html:1 WARNING: SHADER: [ID 22] Failed to compile fragment shader code
game.html:1 WARNING: SHADER: [ID 22] Compile error: ERROR: 0:4: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:4: '' : No precision specified for (float)
game.html:1 ERROR: 0:5: 'in' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:5: '' : No precision specified for (float)
game.html:1 ERROR: 0:8: 'out' : storage qualifier supported in GLSL ES 3.00 and above only
game.html:1 ERROR: 0:8: '' : No precision specified for (float)
game.html:1 ERROR: 0:11: '' : No precision specified for (float)
game.html:1 ERROR: 0:15: '' : No precision specified for (float)
game.html:1 ERROR: 0:15: 'texture' : no matching overloaded function found
game.html:1 ERROR: 0:15: '=' : dimension mismatch
game.html:1 ERROR: 0:15: '=' : cannot convert from 'const mediump float' to '4-component vector of float'
I've reproduced this with my own project as well as the example c code.
It does work if you build for WebGL2.0 and modify the GLSL 330 shaders to be GLSL 300 es conforming. But the GLSL 100 shaders don't work with WebGL1.0 or WebGL2.0.
Environment
Web platform. Windows 11 OS. WebGL1.0 and WebGL2.0. Integrated graphics Intel GPU.
Issue Screenshot
Code Example
Reproducible in the example code.