'needDepthPrePass = true’ obscures subsequent transparent faces in the same mesh.
Left image is single mesh without depth pre pass, middle one is single mesh with depth pre pass, and right one is how it looks right now with several meshes each with depth pre pass enabled.
Another idea I had was to try to set the alpha on the rendering group as a whole instead of on each individual mesh. Don’t know if that’s possible but perhaps it could be a cleaner solution in my case.
It’s setting the alpha mode “by hand” on each mesh, but the meshes themselves are not flagged with transparency, so they are rendered as opaque meshes: depth writing and testing are both enabled.
At first sight you would think it works but:
The cylinder is drawn before the torus, so the torus will blend with it.
For this to work, I think you would either need to sort the meshes from front to back or need the back faces to be drawn as usually, meaning without transparency so that they won’t blend with whatever is behind, and then draw the front faces with transparency.