Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No renaming list is removing functions #350

Open
aW4KeNiNG opened this issue Apr 18, 2024 · 2 comments
Open

No renaming list is removing functions #350

aW4KeNiNG opened this issue Apr 18, 2024 · 2 comments

Comments

@aW4KeNiNG
Copy link

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
Copy link
Owner

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

@therontarigo
Copy link
Contributor

therontarigo commented Apr 29, 2024

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-list functions are not removed
  • The default no-renaming-list is main (and mainImage, because of Shadertoy?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants