I am new to the forums and somewhat new to OpenGL. Hopefully I put this on the correct board.
I am currently attempting to implement grass rendering based on this article:
I am having some pretty severe frame rate problems that I think are due to fill rate. Using the "grass elements" described in the article (basically three quads forming a skewed triangle or star when viewed from above) and the setup that is described in the article my frame rate drops to 20-25 from certain angles with 400 grass elements (2400 triangles).
What I do is this:
- Sort the grass elements in back to front order
- Enable depth testing
- Enable blend
- Draw the elements
I've tried a few things to try to remedy the low frame rates.
First I tried to ignore semitransparent texels and sorted the elements front to back, enabled alpha test and disabled blend but this did not fix it.
Then I thought that maybe my textures were too sparse so I tried using completely filled textures instead but that did not fix it either.
Note by "not fixed" I mean that from certain angles the frame rate is still as low as 45-50.
Also note that I have disabled all other things that I thought might affect the frame rate. My vertex shader simply sends the texture coordinates and calculates gl_Position and my fragment shader is only a texture lookup.
Thanks in advance