Quilly-Crawler
Quilly-Crawler copied to clipboard
Outline Shader textureSize function does not work on some machines
vec2 pixelSize = 1.0 / textureSize(u_texture, 0).xy;
Exception in thread "main" com.badlogic.gdx.utils.GdxRuntimeException: Could not compile shader 'commonsOutlineShader': Fragment shader:
0(16) : error C7532: global function textureSize requires "#version 130" or later
0(16) : error C7011: implicit cast from "ivec2" to "vec2"
https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/textureSize.xhtml
Workaround would be sending the texture size as uniform but we need to be careful as this is requiring a flush and therefore it should be ideally only happen once per frame / texture binding.