Graphics Reference
In-Depth Information
(a) Horizontal tiles
(b) Vertical tiles
(c) Grid layout
(d) Fullscreen tile
Figure 5.3. Different tile layouts.
Make the tiles too big compared to the underlying geometry and too many frag-
ments will unnecessarily be shaded (using a stencil can come in handy here as
described in Section 5.4.3).
A good layout is a layout that minimizes partially covered tiles (fully trans-
parent fragments) and that keeps the number of draw calls as low as possible.
Depending on the number of sprites to be rendered, a well-chosen layout can even
help reduce the total draw call count considerably (in the best case, up to eight
times fewer draw calls on current gen mobile GPUs).
Simple useful common layouts include vertical slices, horizontal slices, the
grid, or even the single fullscreen tile as demonstrated in Figure 5.3.
In Section 5.4.1, we describe a simple approach to dynamically reduce the
number of tiles to be rendered.
5.3.2 Supporting More Layers
When the number of sprites to blend in a single tile is above the maximum it can
hold (see Section 5.3.4), new screen-space tiles can be instantiated as required at
the exact same position to support the extra layers to blend. Figure 5.4 shows
how a second tile layer was added to support the example scene if each tile could
only blend two layers.
Search WWH ::




Custom Search