So how what would be the best way to have lets say 1000 nodes all with the same geometry buffer, all using the same material, all have different transform matrices, and a different uv2 buffer.
I have a couple ideas I want to try, but figured the greater good might have a better idea then me. Was thinking I might have to make my own shader that has the uv2 buffer just stacked on itself for all the nodes and then have an id and a stride offset for each mesh so I can associate the correct uv2.
Basically we are trying to solve this:
Another thing I was thinking was that the SPS could handle it, or perhaps a extension of thin instances.
Its for a lightmap so I think its like an atlas, are you saying use a custom shader that offset and scales the uv on the vertex the passes that as the uv2 to the fragement? Oooo dude I think you nailed it.
could you pretty please show me a small example of how I would go about that? I think I know but honestly am drawing a blank on if I should do it as a custom material or use thin instances or SPS.
Normally Id dive in on my own with this but I’m running mental blanks at the moment. So even a pointer to the right docs would help.
If your uv2 are completely different from one instance to the other you will have to put all the uv2s of all the instances in a texture and use an attribute to indicate the offset in this texture to start reading the uv for each instance.
If your uv2 can be deduced from the uv by a simple offset + scale you can just pass this offset + scale as two instance attributes, but I doubt you are in this case.