@bghgary@Cedric I’m having trouble with instancedBuffers in Babylon React Native, specifically changing UVs per instance, which results in unpredictable changing of vertex position rather than UVs, but no error.
I found this open issue:
But there’s also a mention of some work having been done on this in the merged PR:
So I’m a bit confused about the status.
Here’s some PG examples of the types of instancedBuffers usage I’m experiencing trouble with:
Instancing with BabylonNative/BabylonReactNative is very limited because of constraints on our rendering back end.
Basically, you can only instanciate the world matrix and the color. That’s a total of 5 vec4.
For now, it’s not possible to instanciate uv or anything else.
If you need different UV per instance, I would try to store an UV offset in the color. Like an index in an atlas texture.
So, with this technic, you will have to write your vertex shader accordingly.
Hmmm, sorry me again @Cedric , but I just can’t seem to get this working in Babylon React Native. Here’s an adjusted PG showing exactly what I’m trying to do in the way it’s implemented in Babylon React Native (as per all the suggestions above). This code works fine in the playground, but in my Babylon React Native codebase the geometry is messed up and just unlit black but no errors or warnings.