This thread and the attached example code may be helpful - you can switch off certain elements, render the depth texture, then switch the elements back before color is rendered.
mjurczyk
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| WebGLRenderTarget depthTexture behaves differently in Safari, Chrome and Firefox | 4 | 3169 | May 3, 2019 | |
| Only show opaque objects behind transparent objects | 3 | 1436 | October 30, 2018 | |
| Use actual depthBuffer as texture in shader | 2 | 2147 | November 25, 2019 | |
| Using depth + mask-image as a way to occlude css3D elements | 3 | 496 | August 6, 2023 | |
| Using depth texture in ShaderPass | 7 | 7348 | November 26, 2019 |