From one angle my shrubs look like this:
From the other, they look like this:
If you're in WebGL or OpenGL ES 2.0 (iPhone/Android) there is no alpha testing. Instead you need to not draw transparent pixels. That way they won't affect the depth buffer since no pixel was written. To do that you need to discard pixels that are transparent in your fragment shader. You could hard code it
...
void main() {
vec4 color = texture2D(u_someSampler, v_someUVs);
if (color.a == 0.0) {
discard;
}
gl_FragColor = color;
}
or you could simulate the old style alpha testing where you can set the alpha value
...
uniform float u_alphaTest;
void main() {
vec4 color = texture2D(u_someSampler, v_someUVs);
if (color.a < u_alphaTest) {
discard;
}
gl_FragColor = color;
}