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

externals are mangled if a non-external with the same name is in the mangleMap #8

Closed
dekdevy opened this issue Apr 3, 2023 · 2 comments · Fixed by #16 or #17
Closed

externals are mangled if a non-external with the same name is in the mangleMap #8

dekdevy opened this issue Apr 3, 2023 · 2 comments · Fixed by #16 or #17
Labels
bug Something isn't working

Comments

@dekdevy
Copy link

dekdevy commented Apr 3, 2023

Shader 1:

void main() {
  vec3 light = vec3(1.0);
}

Shader 2:

out vec3 light;
void main() {
  light = vec3(1.0);
}

Even if the mangler is instructed to not mangle externals, the second shaders external light will be mangled.

@dekdevy dekdevy changed the title externals are mangled if a non-external was previously written to the mangleMap externals are mangled if a non-external with the same name is in the mangleMap Apr 3, 2023
@CodyJasonBennett CodyJasonBennett added the bug Something isn't working label Apr 4, 2023
@dekdevy
Copy link
Author

dekdevy commented Apr 4, 2023

This also applies to vector selectors, happening for the same reason. ( I suppose it will apply to pretty much everything that would otherwise be prevented from being mangled in the checks that come after the manglemap lookup )
I havent explicitly checked, but this would probably also happen within a single shader.

float x = 1.0;

=> float a=1.0;
vec3 test = vec3(1.0);
test.x = 5.0;

=>vec3 b=vec3(1.0);b.a=5.0;

@CodyJasonBennett
Copy link
Owner

Have a fix in v0.1.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants