I’m trying to write a shader which is completely transparent, only effecting the depth buffer. I’ve tried simply making the value of gl_FragColor to have zero alpha, but then it writes 0 to the depth buffer. Interestingly, increasing alpha seems to effect the depth buffer proportionately. I’ve also tried using the default material, setting opacity map to be invisible, and enabling depth write which also does not write to the depth buffer. All implementations have had depth write enabled.
I’ve done a fair bit of googling on this and have not found anything which seems to allude to a solution, does anyone have any ideas?
To reiterate, essentially I want a custom material which is invisible but still has a normal effect on the depth buffer.