VonPaulus Posted December 21, 2016 Share Posted December 21, 2016 hi, I tried to create instances of meshes, basically cloned my loaded meshes and then create instances of that clones, but run into issue. some instances created fine but others throws in console "[.CommandBufferContext.Offscreen-MainThread-0x12d4118a0a00]GL ERROR :GL_INVALID_OPERATION : glDrawElementsInstancedANGLE: attempt to access out of range vertices in attribute 2" during render. I also created small demo http://www.babylonjs-playground.com/#1NAQZD#8 . looks like this errors occurs only when some of the instances out of screen, maybe I forget something or this approach can't be used, but didn't found in docs any restrictions about using clones and instances. so what is the right approach to solve this? using Chrome Version 51.0.2704.103 (64-bit) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 21, 2016 Share Posted December 21, 2016 Here is your fix:http://www.babylonjs-playground.com/#1NAQZD#9 Basically you cannot directly create an instance on a clone without making the clone unique Quote Link to comment Share on other sites More sharing options...
VonPaulus Posted December 22, 2016 Author Share Posted December 22, 2016 thanks! for future readers: clonedMesh.makeGeometryUnique() - solves the problem Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.