Relative Content

Tag Archive for javascriptwebglogl

Webgl: Separate position offsets for instanced geometry in multiple meshes

I am using the OGL library and have a simple setup, 2 meshes acting like tiles where each will house 2 instanced cubes. I want to provide different position offsets to each of these cube instances for both of the meshes/tiles, but my code only appears to apply the same offset which can be seen in the fiddle below. Every time you run it, both meshes/tiles applies the same x and z offset to their respective cubes.