3D图形配料 [英] 3D Graphics Batching

查看:217
本文介绍了3D图形配料的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多网站/文章说批!批量!批量!'。有人能解释配料重presents相对于着色器?

A lot of sites/articles say 'batch! batch! batch!'. Can someone explain what 'batching' represents with respect to shaders?

也就是说,确实

  1. 在不断变化的纹理
  2. 在改变任意着色器变量

的意思是不能被批?

(很抱歉,如果这是一个弱智的问题:D)

(Sorry if this is a retarded question :D)

推荐答案

要总结一下就是尽量让尽可能少的API调用,你可以画出你所需要绘制的最简单方法。使用顶点数组或维也纳组织(即使是在现代的API可选),纹理地图和避免了状态变化都有助于这一点。这真是太神奇了多少个三角形现代GPU可以在它把你转身和设立下一个图形通话时间画。

The easiest way to summarize it is to try to make as few API calls as you can to draw what you need to draw. Using vertex arrays or VBOs (not even optional in modern APIs), texture atlases and avoiding the need for state changes all contribute to that. It's really amazing how many triangles a modern GPU can draw in the time it takes you to turn around and set up the next drawing call.

这篇关于3D图形配料的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆