-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
TSL: Introduce array()
#30386
TSL: Introduce array()
#30386
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@RenaudRohlinger I implemented your suggestion of |
Certainly yes, I'm happy to see how similar the PRs were. Always grateful for your help and suggestions :) |
This is also important for DrawIndirect, since the frustum planes are needed in the compute shader. I've previously handled these as 6 individual vec4s in one struct. This fits perfectly with the struct expansion.
|
I mean I've been doing it like this so far:
This works very well even with very large uniform arrays, but I wasn't sure whether this was the best solution |
Closes #30097
Description
The implementation has two types of declarations
array( [ ...nodes ] )
andarray( 'type', count )
. Both are compatible with.toConst()
and.toVar()
and have been updated in parse.TempNode
has also been updated to automatically generate cache if.toVar()
is not used.