Abstract
DRAW call cost is a major issue for game engine rendering performance and is most often caused by material and shader switching. This article describes a technique for building consolidated shaders that allows for a wide variety of different appearances and thereby can be used for most materials in a 3D world. The technique uses novel UV data packing and can decrease draw call cost. An actual shader is implemented using the technique and tests show a frame-rate increase of up to 14% in a typical scene.
ACKNOWLEDGMENTS
This article would not have been possible without the team at Exit Strategy Entertainment and in particular the work of Soenke Seidel. Thanks also goes to Timothy Cooper of Unity Technologies for some valuable discussions. Henrik Schonau Fog and Rama Hoetzlein, both at Aalborg University, also deserve a thankful mention for their help with refining this article.
Notes
1 MIP is an acronym for multum in parvo, meaning “much in little” and is a technique for generating lower resolution samples of a texture, which can be rendered for surfaces far away in order to increase rendering speed and reduce artifacts.
2 Number of pixels that a GPU can rasterize and write to the frame buffer per frame.
4 Tests were performed on Core I3 clocked at 2.13GHz and a Radeon 5650 GPU.
5 Tests were run in Unity 3.5b2.
6 Those are too rarely used on many different objects, and implementing support for them in the consolidated shader would be unlikely to yield any frame-rate improvements. There is, however, nothing preventing a consolidated shader from being built to support these kinds of surfaces.