   Render grass
  helloI meet some problem in workwhen I Render a lot of grass out-door (I using alpha-blend)Do I need sort them(grass) by their Z-buffer lengthIf I do this ,I should Speed at least n(log(n)) time to sort them!any good idea did you have ?thanks! there ara two pics show different between sort and Not sort[img]http://bbs.66rpg.com/upload_program/files/shot2.jpg[img]after sort(I guess ,I don't Know How he implete this )[img]http://bbs.66rpg.com/upload_program/files/shot1.jpg[img]mine . I use "glDepthMask( GL_FALSE );" to avoid update  Z-bufferI know it's wrong ,but I don't like to use sort ,because it take up so many time ,Are there any good idea to avoid sort and get right render pass thanks!   
  Alpha sorting is quite a fundimental problem in computer graphics and far as I know the only real solution is to sort the triangles before you draw them. In the case of grass however, sorting every single grass will, as you say, be a lot of work. One solution might be to render the scene several times and moving the near/far clipping planes from back to front so that you draw a "slice" of all the grass at a time. Or maybe you can keep the grass in some sort of bounding volumes and sort these?   ;  I get good results with alpha masking.Try this code right after you bind a texture with alpha transparency:glEnable(GL_ALPHA_TEST);glAlphaFunc(GL_GREATER,0.1f);This works for me. However, depending on the resolution of your grass texture, there will still be areas of the texture which are partly colored and therefore rely on alpha blending instead.   