I'm using TWGL to create an NxN plane buffer which I then use as a mesh (twgl.primitives.createPlaneBufferInfo), with extrusion on the Z axis relative to lightness values in a video. It all looks pretty good, except that I am getting strange clipping artifacts in the (-X, -Y) and (X, Y) quadrants. See the attached image for an example...
I saw this post which raises similar questions, and suggests depth sorting but it's not obvious how I would even do this sorting given that relative depth is decided on the fly in the shader. There is also a suggestion to disable depth testing and enabling face culling, but that does not work. I assume there must be some sort of alternative since what I'm doing isn't particularly uncommon. Perhaps I need to generate the mesh differently? It's also not obvious to me why this would only happen in two of the four quadrants. Thanks in advance!