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

No renaming list is removing functions #350

Open aW4KeNiNG opened 2 months ago

aW4KeNiNG commented 2 months ago

The minimal case is:

precision highp float;

varying vec4 vColor;

void main() {
        gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
}

using shader_minifier.exe -o output.glsl --format text --no-renaming-list "vColor" input.glsl

the result is:

precision highp float;varying vec4 vColor;
laurentlb commented 2 months ago

The behavior is indeed surprising. For now, use --no-renaming-list vColor,main to keep main.

therontarigo commented 2 months ago

The behavior shouldn't be changed as it is working as described, but this particular gotcha could be pointed out in documentation.

No renaming list is not removing functions, but rather: