渲染性能问题

千头万绪,梳理为主。梳理就是要表达清楚面临的问题是什么,目标是什么,以及什么是什么。这里就是做个线头,牵出后面的什么是什么。

quad overdraw

引用
This is the reason why small polygons waste GPU time. In this case, a “quad” means a block of 4 pixels (2 by 2). And most of the operations on the GPU when it comes to pixel shading are done on full quads or even bigger tiles, like 8x8. Not on single inpidual pixels. It’s easier for the GPU, or sometimes necessary, to perform operations on bigger tiles and only then discard unnecessary pixels. So the discared pixels are basically wasted. As you can imagine, the smaller the triangle, or more thin the triangle, the bigger the problem.
翻译一下就是:pixel shading很多时候是以四边形或更大的区块为单位来进行的,GPU擅长这样处理。当你要渲染像素级大小的网格时,GPU可能是以先渲染包围该网格的更大的区域然后丢弃多余的渲染结果的方式来进行处理的,这样绝大部分的渲染工作都是浪费的。像这样极小的网格越多,GPU浪费的工作越多。此即为quad overdraw是也。

pixel-bound

引用
Pixels are most probably the slowest part in your pipeline. The bigger the resolution, the more pixels we have to be shaded!
So how to check if we’re pixel-bound? While running our game, we can press ~ and enter: r.ScreenPercentage (for example) 25 or r.SetRes 480x270, for example. Then if your framerate improved a lot, then it means you’re pixel-bound. Not for example vertex- bound or memory-bound. The pixels are the problem.