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

Why vec2 position instead of vec3 at the cost of rewrite computeBounding functions ? #36

Open
lateek35 opened this issue Mar 18, 2020 · 1 comment

Comments

@lateek35
Copy link

lateek35 commented Mar 18, 2020

I saw that THREE couldn't manage computeBounding's functions with vec2 position attributes.

However, you have made the choice to stay with vec2, which implies having to rewrite the computeBounding functions yourself.


Is it because vec2 add a significant performance boost over using vec3 ? Or something else ?

Thanks

@mattdesl
Copy link
Contributor

mattdesl commented Jul 2, 2020

Mainly because it requires less data storage and buffer transfer bandwidth. Using vec2, you are transferring 1 less float per vertex, i.e. 4 less floats per text glyph or 16 less bytes.

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