Kha
                                
                                 Kha copied to clipboard
                                
                                    Kha copied to clipboard
                            
                            
                            
                        textureSize not supported in Linux build
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:
- Download example project TextureSample.zip
- Run the project with F5
- Press keys 1,2,3,4 to change the colours on the lefthand square.
- Build the project for Linux (full build)
- Run the Linux build, and see that the coloured squares are missing.
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)
Incorrect output when viewed as Linux (full build)

Execution Environment:
- Host system (where you compile your code): Windows or Linux
- Target system (where you run your code): Windows or Linux
- IDE used (if any): VSCode
- Kha revision: Latest as of 15/03/2021
- Kha build output (Using Kha...): (¯\_(ツ)_/¯) <--That is literally the version that shows up
- Application output (if it runs):
Oh no, you are still on Kha revision ¯\(ツ)/¯
Yeah that's when the vscode plugin one runs. I will try cloning Kha into the sample project.
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.
Oh no, you are still on Kha revision ¯_(ツ)_/¯
Fixed that here: https://github.com/Kode/khamake/pull/250