Page 1 of 1
GLSL unsigned integers not supported in last version ?
Posted: Tue Sep 18, 2018 10:00 pm
by logoliv
Hi all,
I've joined a file as example of my problem : when i run this app in Löve 0.10.1 everything runs fine, but not in Löve 11.1 : I only obtain a generic error message without explanation...
As you can see, to enable uint support in my shader I have included these lines :
#extension GL_EXT_gpu_shader4 : enable
#extension GL_ARB_shader_bit_encoding : enable
With Löve 0.10.1 when i launched the app without these i had an explicative error message saying that i must perhaps add the extensions, but it seems they are not valid anymore in 11.1
If some dev can give me a solution it would be nice, thanks in advance.
Re: GLSL unsigned integers not supported in last version ?
Posted: Tue Sep 18, 2018 10:24 pm
by pgimeno
Try adding this line at the top of the shader:
Re: GLSL unsigned integers not supported in last version ?
Posted: Wed Sep 19, 2018 10:47 am
by logoliv
thanks for your answer, but it does not work
Re: GLSL unsigned integers not supported in last version ?
Posted: Wed Sep 19, 2018 2:45 pm
by pgimeno
Really? It works fine for me after that change. I've attached it.
Re: GLSL unsigned integers not supported in last version ?
Posted: Wed Sep 19, 2018 4:15 pm
by logoliv
You're right it works fine, I was in a hurry and surely made a mistake, thanks for your help
By the way, something strange happened with Lôve version 0.10.1 : i've used love.graphics.getRendererInfo() to display the GLSL version, and it is 4.6.0 without the pragma directive (3.3.0 with it), instead with Lôve 11.1 the GLSL version is 3.3.0 by default...
What's the difference between
#pragma language glsl3 and
#version 330 ?
Re: GLSL unsigned integers not supported in last version ?
Posted: Wed Sep 19, 2018 9:57 pm
by pgimeno
"#version" is not directly supported by Löve. I imagine that the main reason is that it needs to be placed at the very beginning, but Löve needs to add code before that, and the code it needs to add may depend on the version.
"#pragma language glsl3" is for Löve 11.1 only. It makes it add "#version 330 core" for OpenGL and "#version 300 es" for OpenGL ES. The only values supported are glsl1 and glsl3.
You can override Löve's internal shader boilerplate and write GLSL code directly, by overriding function "love.graphics._shaderCodeToGLSL".
Details of all of the above are in the
src/modules/graphics/wrap_Graphics.lua source code.
I don't remember what did 0.10 do, and haven't checked recently. Perhaps it didn't use "#version" at all, which would explain why it takes the default, whatever that is.
Re: GLSL unsigned integers not supported in last version ?
Posted: Thu Sep 20, 2018 10:58 am
by logoliv
very interesting informations, I just had a look at the wrapper and it's all clear now