I have recently migrated from WebGL to WebGPU, after interacting with the scene for a while I start to get, what I thought to be a minZ issue, where the camera cuts into the mesh but it is inconsistent.
I wish I could there is too much IP / confidential company information to share the repo. I’ve console.log(scene.activeCamera.minZ) on an interval and consistently and I am getting the 0.001. Is there anything else I can log or profile to get a better understanding?
But in the second vid, it seems like the mesh itself has moved position? So maybe the cam is keeping the original distance, but because the mesh has moved it’s now clipping inside it?
This also might sound “dumb”, but perhaps the models you’re using are very tiny as-is. Try setting the value EVEN LOWER than 0.001 like 0.0001 instead and see if it’s even having any affect on the camera clipping at all
The root cause was depth peeling (OIT) corrupting the WebGPU depth buffer after compute shader passes. The fix was: disable depth peeling, use reverse depth buffer for better precision, raise camera.minZ to 1, and properly enable/disable edited meshes instead of toggling visibility.
I used Claude Code to help me with this one, I am going to working with our compliance team to see if we can release the sculpting aspect of this.