Shader_Minifier
Shader_Minifier copied to clipboard
No renaming list is removing functions
trafficstars
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;
The behavior is indeed surprising.
For now, use --no-renaming-list vColor,main to keep main.
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:
- renamed unused functions are always removed by default
no-renaming-listfunctions are not removed- The default
no-renaming-listismain(andmainImage, because of Shadertoy?)