我的实验表明,TBR架构中渲染顺序对性能影响很大,为什么?
TBR 芯片在片段处理之前执行 HSR(隐藏表面去除),因此仅渲染可见像素。此功能无需从前到后对不透明对象进行排序。但我在我的 iPhone 3GS 上做了一个实验。通过比较帧时间,从前到后渲染不透明对象比从后到前渲染要快得多。 为什么会显示这个结果呢?无论以哪种顺序渲染对象,性能都应该非常接近。
TBR chips perform HSR (hidden surface removal) before fragment processing, so only the visible pixels are rendered. This feature results in no necessary sorting opaque objects from front to back. But I have done a experiment on my iPhone 3GS. By comparing the frame time, rendering opaque objects from front to back is much faster than back to front.
Why does it show this result? The performance should be very close when objects are rendered in whichever order.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信不执行片段处理的优化是通过使用 Z 缓冲区来确定像素是否可见(如果像素不可见则提前退出管道)来完成的。因此,从后到前渲染将是该优化的最坏情况(不可能进行优化),而从前到后渲染是最好情况(所有最终隐藏的像素都已隐藏)。
I believe that the optimization to not perform fragment processing is done by using the Z-buffer to determine if a pixel is visible or not (and early out the pipeline if the pixel isn't visible). As a result rendering back-to-front will be worst-case for that optimization (no optimization possible) and front-to-back is best-case (all eventually hidden pixels are already hidden).
如果为真,则与 Apple 有关该主题的文档:
以及文档此处:
If true, that contradicts Apple's documentation on the topic:
As well as the documentation here: