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 | 3176 | May 3, 2019 | |
| Only show opaque objects behind transparent objects | 3 | 1440 | October 30, 2018 | |
| Use actual depthBuffer as texture in shader | 2 | 2153 | November 25, 2019 | |
| Using depth + mask-image as a way to occlude css3D elements | 3 | 506 | August 6, 2023 | |
| Using depth texture in ShaderPass | 7 | 7363 | November 26, 2019 |