Original Post
Hello! I wanted to ask you how would you solve my simple problem. There is plenty of ways to do that but I am curious about the most efficient one. Here is a situation - I have a 2D texture with alpha channel. When I put it on a screen some parts are translucent and some - obviously - are not. The thing is that the whole image is written into a depth buffer as a solid quad (it's not the shape of the image that appears in color buffer). My question is how can I use my color data to manipulate depth buffer just like color buffer is? Example - if one of image's pixels have alpha = 0.0 a depth value corresponding to the pixel would not change after the texture is drawn on screen. Thanks for your help :)