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
Describe the bug
A fragment shader will fail to run in Linux (full build) if the shader uses "textureSize" anywhere in its code. The same shader will work fine in WebGL or Windows.
This is a follow up to #1308 after I worked out what was going on.
Notes from Rob:
textureSize does indeed not work on older glsl versions, see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/textureSize.xhtml
And for Linux we default to a very early version... because Linux and its horrible graphics drivers situation.
I'll put in a warning for this, this should not silently fail.
We could actually put in a workaround for systems which do not support it directly, will think about it.
To Reproduce
Running the attached project shows 2 squares - the lefthand square uses a shader that uses "textureSize", it has 4 colours in it that change when you press the number keys. The righthand square is an image that uses the default shader, and doesn't use "textureSize".
Looks similar to #1302 — I have the same problem as you compiling your example for Linux. It works if you add --shaderversion 330 to the build command.
Describe the bug
A fragment shader will fail to run in Linux (full build) if the shader uses "textureSize" anywhere in its code. The same shader will work fine in WebGL or Windows.
This is a follow up to #1308 after I worked out what was going on.
Notes from Rob:
textureSize does indeed not work on older glsl versions, see https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/textureSize.xhtml
And for Linux we default to a very early version... because Linux and its horrible graphics drivers situation.
I'll put in a warning for this, this should not silently fail.
We could actually put in a workaround for systems which do not support it directly, will think about it.
To Reproduce
Running the attached project shows 2 squares - the lefthand square uses a shader that uses "textureSize", it has 4 colours in it that change when you press the number keys. The righthand square is an image that uses the default shader, and doesn't use "textureSize".
Steps to reproduce the behavior:
Expected behavior
The colours should still show as they do in the F5 WebGL preview, and Windows (full build),
Screenshots
Correct output when viewed as WebGL or Windows (full build)
Incorrect output when viewed as Linux (full build)
Execution Environment:
The text was updated successfully, but these errors were encountered: