   How to achieve correct transparencies?
  I'm trying to render grass billboards. Originally, we used just an alphamask, but the results weren't too good, and we decided to add an alphachannel to the grass texture, to get smooth looking grass.However, the result is even worse.What is the correct way to do render this stuff correctly?The current method is as followFirst render all normal world geometryThen disable lighting, and enable blending with  glEnable(GL_BLEND);  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);Then select the grass texture and render all billboardsAll billboards are depth sorted. We tested with additive blending and then the grey artifacts around the grass dissapeared, but of course it just doesnt look like grass anymore.Any ideas of what we may be doing wrong?I cant actually post the whole code here, since its a very large project that spawns about 50 source files.   
  You should render transparent stuff last (so after all the opaque stuff). This will fix the weird halos. However, to get transparency to look 100% correct, you'll also have to sort transparent geometry back-to-front and render it with disabled z-write.   ;  As far as I can tell glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) is the correct function to use.But you surely have bilinear or trilinear filtering enabled you probably need to make at least a one pixel border around your plant in the texture with the grass color. Not doing so and for instance having a white background with alpha 0 could cause those borders in your image.   ;Quote:Original post by TrenkiAs far as I can tell glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) is the correct function to use.But you surely have bilinear or trilinear filtering enabled you probably need to make at least a one pixel border around your plant in the texture with the grass color. Not doing so and for instance having a white background with alpha 0 could cause those borders in your image.I found the same thing. If i use an alpha mask, and have a slight border around the grass texture, the color in the background will be the color of the grass and there will be no noticeable "halo" around the grass billboard.;  I probably should have given a better explanation rather than just giving a solution: OpenGL uses a Z-Buffer to determine whether to draw a pixel onto the screen or not (based on that pixel's depth value). This works great for opaque geometry but not so great for transparent stuff, because transparent objects don't fully occlude the stuff that's behind them. On your screenshot, it looks like you were rendering the bushes before rendering the ground. This wouldn't matter if the bushes weren't transparent, but because they are, you're seeing these halos. The problem is that OpenGL thinks "there's already a pixel here that is closer to the camera, so let's not render the ground" despite the fact that the ground is actually visible THROUGH the bush. If you render the transparent geometry last, the ground will already be in the frame buffer and you won't see the halos. However, since the z-Buffer doesn't actually sort the pixels, looking at a transparent object through another transparent object may look weird if they're not by chance rendered in the right order. Hence, to make it look right, you'll have to render transparent stuff back-to-front.   ;  I have a question though; How did you depth sort your surfaces? Are you using a BSP map? Or, do you sort them once per frame and then display them?;  Also, when are you rendering your transparent objects?  It looks like they might be blending against your sky or your water or something..sam