Hi,
I have a boulevard walkthrough with trees at the sides of the boulevard. The trees consist very small leaves on their branches.
I want to create a movie of the boulevard, but far tree leaves flicker very frequeny!
Using mipmaps is out of the question to me, because it creates a halo around the leaf texture (because the trasparent texels are blended with the leaf texels).
In addition the mipmaps magnify the leaves size when looking from not near distance.
The reason for the flickering is the z-buffer, which has 24 bits (This is the maximum I have succeeded to get).
In order to solve the problem I have decided to render my scene as follows:
I splitted my frustum into very small sub frustums and rendered to each one of the frustums from back to front and accumulated the color buffer.
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
for(int = i; i < numOfFrustum; ++i)
{
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
setFrustum(subFrustum[i]);
renderScene();
glClear(GL_DEPTH_BUFFER_BIT);
}
no matter how small how make my sub frustums the tree leaves don’t stop to flicker.
How can I stop the flickering without using mipmaps???
(about sorting the leaves from back to front, it seems hard to me , as each tree consists dozens of thousands of leaves)
Thanks,