Game Engine Architecture

(Ben Green) #1
445

plicated N times on the die, N data elements can be processed in parallel by
that stage. A parallelized pipeline is shown in Figure 10.39. Ideally the stages
operate in parallel (most of the time), and certain stages are capable of operat-
ing on multiple data items simultaneously as well.
The throughput of a pipeline measures how many data items are processed
per second overall. The pipeline’s latency measures the amount of time it takes
for a single data element to make it through the entire pipeline. The latency
of an individual stage measures how long that stage takes to process a single
item. The slowest stage of a pipeline dictates the throughput of the entire pipe-
line. It also has an impact on the average latency of the pipeline as a whole.
Therefore, when designing a rendering pipeline, we att empt to minimize and
balance latency across the entire pipeline and eliminate bott lenecks. In a well-
designed pipeline, all the stages operate simultaneously, and no stage is ever
idle for very long waiting for another stage to become free.


10.2.1. Overview of the Rendering Pipeline


Some graphics texts divide the rendering pipeline into three coarse-grained
stages. In this book, we’ll extend this pipeline back even further, to encompass
the offl ine tools used to create the scenes that are ultimately rendered by the
game engine. The high level stages in our pipeline are:


z Tools stage (offl ine). Geometry and surface properties (materials) are de-
fi ned.
z Asset conditioning stage (offl ine). The geometry and material data are pro-
cessed by the asset conditioning pipeline (ACP) into an engine-ready
format.

Stage 3

Stage 1

Stage 2

Time
Figure 10.39. A parallelized pipeline. The stages all operate in parallel and some stages are
capable of operating on multiple data items simultaneously as well.


10.2. The Rendering Pipeline

Free download pdf