Open LeStahL opened 1 month ago
Actually, I am not so sure that this is actually a shader_minifier bug:
This should be possible to do per specification (the minified shader should be valid)
And indeed, I'm able to compile it successfully using glCompileShader
.
Might make sense to report this in the glslang repository as glslangValidator seems to wrongly complain here.
Ok this one is kinda obscure to track down - I'm using shader_minifier v1.4.0. Minifying the shader
results in the invalid minified shader
which has the glslangValidator output
The problem has two causes:
{
scope gets removed because it's a single-statement loop and thus loop variable declaration overwrites fragment output variable