-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Instancing reset #7230
Instancing reset #7230
Conversation
Gah; that was poor. Yes should be |
The bane of premature optimization... |
I think I would separate it though... state.enableAttribute( programAttribute );
state.setAttributeDivisor( programAttribute, data.meshPerAttribute, extension ); |
Issue is |
Could maybe make a |
That sounds good! |
Something more like that? (not tested) |
Tested. Works. |
Is it an issue this is wrong in v72? Want a PR to master? |
I think it's fine... r72 already had quite a bit of post-release fixes... |
OK, will leave master. Will likely cause a huge number of future merge conflicts if I tried - don't want you cursing me come r73 😜 |
I still consider all this stuff experimental and unstable API so it's kind of expected 😊 |
As an aside: using instancing for 1x1 plane billboards will be likely slower than 4x duplication (position alone) as the gpu needs needs to process more data in the shader (position + offset); with larger models then instancing becomes more suitable as the CPU->GPU bandwidth becomes the bottleneck rather than the shader. I think the tradeoff starts happening around 100 vertices per model - though the api for updating is simpler for instancing - but that can be hidden by library. |
Thanks guys! |
No description provided.