我正在撰写3D制图引擎。
我听说,在你的粉碎方案中使用太多的统一变量是坏的,因为这可能造成经济放缓。
另一方面,有些人说,重新使用一些内在变量,例如冰川-TextureMatrix是一种坏的做法。
How should I organize creating my shader programs ? Should I write plenty of uniforms for each mechanism or can I rely on those built-in variables ? For example, should I use built-in gl_LightSource or define own uniform array with light source informations, so I can have more lights on my scene? I also know about deferred rendering techniques but I want to do basic multiple lights first.
或者,哪些内在变量是科索沃再利用?
What are (dis)advantages of each of these practices?