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

Test that normalizing a zero-length vector produces 0 rather than NaN / Inf #3697

Open
kenrussell opened this issue Oct 3, 2024 · 0 comments

Comments

@kenrussell
Copy link
Member

@lexaknyazev found that applications using the (old, no longer maintained) SceneJS framework are rendering incorrectly on Apple Silicon because the GLSL normalize() operation is being called on 0-length vectors. This behavior isn't defined in GLSL, but it happens to return a zero-length vector on basically all other GPU hardware. On Apple Silicon it produces a vector containing NaNs.

To improve WebGL's portability, the WebGL WG agreed to add a test for this case and to work around it in ANGLE's shader translator on this hardware.

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

1 participant