Graphics Reference
In-Depth Information
(a) Example scene with maximum three
layers per tile
(b) The same scene with maximum two layers
per tile
Figure 5.4. Tiles can be layered to support more blended layers.
5.3.3 Sprite-Tile intersection
The relatively low complexity of our tile layout in After Burner Climax (eight
vertical tiles) and the small amount of clouds to render (a few dozens) allowed us
to use a simple (SIMD) axis aligned rectangle-rectangle intersection test on CPU
with no performance problem.
When using a higher density grid, it could prove to be useful to use a rasteri-
zation strategy as suggested by [Olsson and Assarsson 11] in the context of tiled
shading. This would also allow for arbitrary shapes to be used instead of just
regular quads.
5.3.4 Rendering
The number of layers aggregated by each tile is only limited by the number of
texture units and the number of interpolators supported by the device. 3 For the
sake of the example, we will consider a maximum of eight varyings and eight
texture units for the rest of this chapter (these values match current generation
devices such as the iPhone5 equipped with a PowerVR SGX 543 [Apple 13a]).
To reduce unnecessary work when not all possible layers are being used, we
select among eight different programs (one for each number of blended layers
3 Calling glGet() with GL_MAX_VARYING_VECTORS and GL_MAX_TEXTURE_IMAGE_UNITS
retrieves those values.
Search WWH ::




Custom Search