Quilly-Crawler icon indicating copy to clipboard operation
Quilly-Crawler copied to clipboard

Outline Shader textureSize function does not work on some machines

Open Quillraven opened this issue 3 years ago • 0 comments

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.

Quillraven avatar Jun 06 '21 16:06 Quillraven