laurentlb / shader-minifier

Minify and obfuscate GLSL or HLSL code
https://ctrl-alt-test.fr/minifier/
Apache License 2.0
424 stars 29 forks source link

Wrong operation in constant arithmetic #429

Open therontarigo opened 3 weeks ago

therontarigo commented 3 weeks ago

Input:

out vec4 O;
void main() {
  O.r = (1.*487)/5;
}

Result: out vec4 m;void main(){m.x=97;} Expected: something that evaluates to 97.4 (there is a related bug that neither 487./5 nor 487/5. is simplified. probably they can be solved together).