How to get rid of brakes when redrawing objects on top of each other? One has only to draw a few thousand polygons on top of one another or very close - the performance drops instantly if you look at them. How to fix it? The task is such that polygons must intersect many times between themselves.
- Why doesn't the discard function work in a shader? According to the idea she should discard all unnecessary. But even with an absolutely black screen, fps drops at times, although nothing happens. - OpenGLprogrammer
- If we are talking about a pixel shader, then the point is not even to perform it for pixels that are not visible. We must try to minimize the number of such pixels as much as possible. Before any discard. - cy6erGn0m
|
1 answer
The most famous way is to sort the polygons. The acceleration is obtained due to the fact that when you miss the depth test, it is not necessary to calculate the color of the pixel.
The second method is the improvement of polygons visibility test methods.
And of course, try to pop arrays of vertices at once instead of a multiple call to glVertexXX
|