开发者

Triangle count for model is doubled during render

I am working with the Trinigy 3d engine, and it reports models to have twice as many triangles during render than it does in the model display (let's say 4000 instead of 2000). If I render the model with an additional outline shader, it reports 6000 triangles, so it's not a simple duplication. What could be the proble开发者_Python百科m?


Additional shader passes (like your outline shader) typically increase the number of triangles rendered for a model, since it has to be rendered multiple times. If you are using forward rendering mode, each dynamic light source will also increase the number of triangles rendered, since every dynamic light affecting a model requires it to be re-rendered.

You can avoid this by either using the deferred shading solution of the engine, or collapsing multiple shaders into a single pass.


This is way outside my domain of expertise but maybe it has double-sided rendering turned on and is including each triangle twice in the count.


Probably depends on the shader/lighting complexity. If you have two lights, chances are high that the mesh is rendered once per light (this would also explain why using an outline shader increases the count, it might require one additional pass.) See if you can render without any effects/materials/etc. applied. (Disclaimer: I have never used the Trinigy engine)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜