I’ve implemented a fixed buffer chunk pool for a engine i’m working on. It works fine so far, but the wireframe material seems to get messed up. Once a batch is dropped (geometry not rendered anymore) it’ll push buffers back to a worker, incoming will then replace the array of the buffer attribute (recycle, not copy). It works fine with own shaders but the wireframe seems to use wrong buffer references or something.
Here’s a short clip, after first batches get reused the wireframe of reused ones will get messed up but partially remain fragments or their last state, while the same mesh will look correct applying other shaders. I wonder if it’s any issue grabbing the buffer attribute arrays and transfering out of main thread, or references for the renderer somewhere. (wireframe messes up the quality, sorry)