-
Hi again Filament team, I was hoping you could clarify this comment from your PR:
I have an existing (repeated) transform that I'd like to batch into a single draw call. Here's my (naive) code:
I'm converting this to instead call Here's my (unfinished) CPU + shader code:
It seems that the So my question is:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
So if you want to pass a unique transform per instance, you somehow need to customize |
Beta Was this translation helpful? Give feedback.
material.worldPosition
sets the position of a vertex. By default (in the OBJECT vertex domain), it is computed like so:So if you want to pass a unique transform per instance, you somehow need to customize
transform
depending on the instance. How you do this depends on what you're trying to achieve. If you have some matrices on the CPU you'd like to use, you could pass them as afloat3×3
parameter array and usegetInstanceIndex()
to index into them.