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

Strange formatter behavior #73

Closed
gustafla opened this issue Dec 17, 2024 · 1 comment
Closed

Strange formatter behavior #73

gustafla opened this issue Dec 17, 2024 · 1 comment

Comments

@gustafla
Copy link

I'm sorry, I haven't analyzed this bug at all, but I think it's still worth reporting.

This reproducer:

void main() {
    float sample = texelFetch(u_FontSampler, frag_coord, 0).r;
    FragColor = vec4(vec3(1.), sample);
}

Gets formatted to:

void main() {
    float
    sample = texelFetch(u_FontSampler, frag_coord, 0). r;
FragColor = vec4(vec3(1.), sample);
}
@nolanderc
Copy link
Owner

sample seems to be a keyword in GLSL, so the variable declaration isn’t parsed correctly as there is no valid variable name. It should be more obvious if #63 is fixed.

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

2 participants