<s>
In	O
computer	O
graphics	O
,	O
a	O
computer	O
graphics	B-General_Concept
pipeline	I-General_Concept
,	O
rendering	O
pipelineor	O
simplygraphics	O
pipeline	B-General_Concept
,	O
is	O
a	O
conceptual	O
model	O
that	O
describes	O
what	O
steps	O
a	O
graphics	O
system	O
needs	O
to	O
perform	O
torender	O
a	O
3D	O
scene	O
to	O
a	O
2D	O
screen	O
.	O
</s>
<s>
Once	O
a	O
3D	O
model	O
has	O
been	O
created	O
,	O
for	O
instance	O
in	O
a	O
video	O
game	O
or	O
any	O
other	O
3D	O
computer	O
animation	O
,	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
is	O
the	O
process	O
of	O
turning	O
that	O
3D	O
model	O
into	O
what	O
the	O
computer	O
displays	O
.	O
</s>
<s>
Because	O
the	O
steps	O
required	O
for	O
this	O
operation	O
depend	O
on	O
the	O
software	O
and	O
hardware	O
used	O
and	O
the	O
desired	O
display	O
characteristics	O
,	O
there	O
is	O
no	O
universal	O
graphics	B-General_Concept
pipeline	I-General_Concept
suitable	O
for	O
all	O
cases	O
.	O
</s>
<s>
However	O
,	O
graphics	O
application	B-Application
programming	I-Application
interfaces	I-Application
(	O
APIs	B-Application
)	O
such	O
as	O
Direct3D	B-Application
and	O
OpenGL	B-Application
were	O
created	O
to	O
unify	O
similar	O
steps	O
and	O
to	O
control	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
of	O
a	O
given	O
hardware	B-General_Concept
accelerator	I-General_Concept
.	O
</s>
<s>
These	O
APIs	B-Application
abstract	O
the	O
underlying	O
hardware	O
and	O
keep	O
the	O
programmer	O
away	O
from	O
writing	O
code	O
to	O
manipulate	O
the	O
graphics	O
hardware	B-General_Concept
accelerators	I-General_Concept
(	O
AMD/Intel/NVIDIA	O
etc	O
.	O
</s>
<s>
The	O
model	O
of	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
is	O
usually	O
used	O
in	O
real-time	O
rendering	O
.	O
</s>
<s>
Often	O
,	O
most	O
of	O
the	O
pipeline	B-General_Concept
steps	O
are	O
implemented	O
in	O
hardware	O
,	O
which	O
allows	O
for	O
special	O
optimizations	O
.	O
</s>
<s>
The	O
term	O
"	O
pipeline	B-General_Concept
"	O
is	O
used	O
in	O
a	O
similar	O
sense	O
to	O
the	O
pipeline	B-General_Concept
in	O
processors	O
:	O
the	O
individual	O
steps	O
of	O
the	O
pipeline	B-General_Concept
run	O
in	O
parallel	O
as	O
long	O
as	O
any	O
given	O
step	O
has	O
what	O
it	O
needs	O
.	O
</s>
<s>
The	O
3D	O
pipeline	B-General_Concept
usually	O
refers	O
to	O
the	O
most	O
common	O
form	O
of	O
computer	O
3D	O
rendering	O
called	O
3D	O
polygon	B-General_Concept
rendering	O
,	O
distinct	O
from	O
raytracing	B-Algorithm
and	O
raycasting	B-Algorithm
.	O
</s>
<s>
In	O
raycasting	B-Algorithm
,	O
a	O
ray	O
originates	O
at	O
the	O
point	O
where	O
the	O
camera	O
resides	O
,	O
and	O
if	O
that	O
ray	O
hits	O
a	O
surface	O
,	O
the	O
color	O
and	O
lighting	O
of	O
the	O
point	O
on	O
the	O
surface	O
where	O
the	O
ray	O
hit	O
is	O
calculated	O
.	O
</s>
<s>
In	O
3D	O
polygon	B-General_Concept
rendering	O
the	O
reverse	O
happens	O
-	O
the	O
area	O
that	O
is	O
in	O
view	O
of	O
the	O
camera	O
is	O
calculated	O
and	O
then	O
rays	O
are	O
created	O
from	O
every	O
part	O
of	O
every	O
surface	O
in	O
view	O
of	O
the	O
camera	O
and	O
traced	O
back	O
to	O
the	O
camera	O
.	O
</s>
<s>
A	O
graphics	B-General_Concept
pipeline	I-General_Concept
can	O
be	O
divided	O
into	O
three	O
main	O
parts	O
:	O
Application	O
,	O
Geometry	O
and	O
Rasterization	O
.	O
</s>
<s>
The	O
application	O
step	O
is	O
executed	O
by	O
the	O
software	O
on	O
the	O
main	O
processor	O
(	O
CPU	B-Device
)	O
.	O
</s>
<s>
During	O
the	O
application	O
step	O
,	O
changes	O
are	O
made	O
to	O
the	O
scene	O
as	O
required	O
,	O
for	O
example	O
,	O
by	O
user	O
interaction	O
by	O
means	O
of	O
input	B-Device
devices	I-Device
or	O
during	O
an	O
animation	O
.	O
</s>
<s>
The	O
new	O
scene	O
with	O
all	O
its	O
primitives	B-Algorithm
,	O
usually	O
triangles	O
,	O
lines	O
and	O
points	O
,	O
is	O
then	O
passed	O
on	O
to	O
the	O
next	O
step	O
in	O
the	O
pipeline	B-General_Concept
.	O
</s>
<s>
Examples	O
of	O
tasks	O
that	O
are	O
typically	O
done	O
in	O
the	O
application	O
step	O
are	O
collision	O
detection	O
,	O
animation	O
,	O
morphing	O
,	O
and	O
acceleration	O
techniques	O
using	O
spatial	O
subdivision	O
schemes	O
such	O
as	O
Quadtrees	B-Data_Structure
or	O
Octrees	B-Data_Structure
.	O
</s>
<s>
The	O
geometry	O
step	O
(	O
with	O
Geometry	O
pipeline	B-General_Concept
)	O
,	O
which	O
is	O
responsible	O
for	O
the	O
majority	O
of	O
the	O
operations	O
with	O
polygons	B-General_Concept
and	O
their	O
vertices	O
(	O
with	O
Vertex	O
pipeline	B-General_Concept
)	O
,	O
can	O
be	O
divided	O
into	O
the	O
following	O
five	O
tasks	O
.	O
</s>
<s>
It	O
depends	O
on	O
the	O
particular	O
implementation	O
of	O
how	O
these	O
tasks	O
are	O
organized	O
as	O
actual	O
parallel	O
pipeline	B-General_Concept
steps	O
.	O
</s>
<s>
In	O
special	O
cases	O
,	O
point	B-Algorithm
clouds	I-Algorithm
are	O
drawn	O
directly	O
,	O
but	O
this	O
is	O
still	O
the	O
exception	O
.	O
</s>
<s>
A	O
triangle	O
is	O
the	O
most	O
common	O
geometric	B-Algorithm
primitive	I-Algorithm
of	O
computer	O
graphics	O
.	O
</s>
<s>
This	O
is	O
done	O
by	O
multiplying	O
the	O
corresponding	O
transformation	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
First	O
,	O
we	O
need	O
three	O
rotation	B-Algorithm
matrices	I-Algorithm
,	O
namely	O
one	O
for	O
each	O
of	O
the	O
three	O
aircraft	O
axes	O
(	O
vertical	O
axis	O
,	O
transverse	O
axis	O
,	O
longitudinal	O
axis	O
)	O
.	O
</s>
<s>
Remark	O
:	O
The	O
above	O
matrices	O
are	O
transposed	O
with	O
respect	O
to	O
the	O
ones	O
in	O
the	O
article	O
rotation	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
OpenGL	B-Application
prefers	O
column	O
vectors	O
,	O
DirectX	B-Application
row	O
vectors	O
.	O
</s>
<s>
The	O
decision	O
determines	O
from	O
which	O
side	O
the	O
point	O
vectors	O
are	O
to	O
be	O
multiplied	O
by	O
the	O
transformation	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
In	O
order	O
to	O
draw	O
the	O
entire	O
aircraft	O
,	O
the	O
transformation	B-Algorithm
matrix	I-Algorithm
for	O
the	O
aircraft	O
is	O
first	O
determined	O
,	O
the	O
points	O
are	O
transformed	O
,	O
and	O
then	O
the	O
propeller	O
model	O
matrix	O
is	O
multiplied	O
to	O
the	O
matrix	O
of	O
the	O
aircraft	O
,	O
and	O
then	O
the	O
propeller	O
points	O
are	O
transformed	O
.	O
</s>
<s>
The	O
3D	B-Algorithm
projection	I-Algorithm
step	O
transforms	O
the	O
view	O
volume	O
into	O
a	O
cube	O
with	O
the	O
corner	O
point	O
coordinates	O
(	O
-1	O
,	O
-1	O
,	O
0	O
)	O
and	O
(	O
1	O
,	O
1	O
,	O
1	O
)	O
;	O
Occasionally	O
other	O
target	O
volumes	O
are	O
also	O
used	O
.	O
</s>
<s>
In	O
a	O
perspective	B-Architecture
illustration	I-Architecture
,	O
a	O
central	O
projection	O
is	O
used	O
.	O
</s>
<s>
To	O
limit	O
the	O
number	O
of	O
displayed	O
objects	O
,	O
two	O
additional	O
clipping	B-Algorithm
planes	O
are	O
used	O
;	O
The	O
visual	O
volume	O
is	O
therefore	O
a	O
truncated	O
pyramid	O
(	O
frustum	O
)	O
.	O
</s>
<s>
Maps	O
use	O
,	O
for	O
example	O
,	O
an	O
orthogonal	O
projection	O
(	O
so-called	O
orthophoto	B-General_Concept
)	O
,	O
but	O
oblique	O
images	O
of	O
a	O
landscape	O
cannot	O
be	O
used	O
in	O
this	O
way	O
-	O
although	O
they	O
can	O
technically	O
be	O
rendered	O
,	O
they	O
seem	O
so	O
distorted	O
that	O
we	O
cannot	O
make	O
any	O
use	O
of	O
them	O
.	O
</s>
<s>
For	O
reasons	O
of	O
efficiency	O
,	O
the	O
camera	O
and	O
projection	O
matrix	O
are	O
usually	O
combined	O
into	O
a	O
transformation	B-Algorithm
matrix	I-Algorithm
so	O
that	O
the	O
camera	O
coordinate	O
system	O
is	O
omitted	O
.	O
</s>
<s>
Only	O
the	O
primitives	B-Algorithm
which	O
are	O
within	O
the	O
visual	O
volume	O
need	O
to	O
actually	O
be	O
rastered	O
(	O
drawn	O
)	O
.	O
</s>
<s>
Primitives	B-Algorithm
which	O
are	O
completely	O
outside	O
the	O
visual	O
volume	O
are	O
discarded	O
;	O
This	O
is	O
called	O
frustum	B-Algorithm
culling	I-Algorithm
.	O
</s>
<s>
Further	O
culling	B-Algorithm
methods	O
such	O
as	O
backface	O
culling	B-Algorithm
,	O
which	O
reduce	O
the	O
number	O
of	O
primitives	B-Algorithm
to	O
be	O
considered	O
,	O
can	O
theoretically	O
be	O
executed	O
in	O
any	O
step	O
of	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
.	O
</s>
<s>
Primitives	B-Algorithm
which	O
are	O
only	O
partially	O
inside	O
the	O
cube	O
must	O
be	O
clipped	B-Algorithm
against	O
the	O
cube	O
.	O
</s>
<s>
The	O
advantage	O
of	O
the	O
previous	O
projection	O
step	O
is	O
that	O
the	O
clipping	B-Algorithm
always	O
takes	O
place	O
against	O
the	O
same	O
cube	O
.	O
</s>
<s>
Only	O
the	O
-	O
possibly	O
clipped	B-Algorithm
-	O
primitives	B-Algorithm
,	O
which	O
are	O
within	O
the	O
visual	O
volume	O
,	O
are	O
forwarded	O
to	O
the	O
final	O
step	O
.	O
</s>
<s>
For	O
the	O
DirectX	B-Application
programming	B-Application
interface	I-Application
,	O
the	O
use	O
of	O
a	O
custom	O
vertex	O
shader	O
is	O
necessary	O
from	O
version	O
10	O
,	O
while	O
older	O
versions	O
still	O
have	O
a	O
standard	O
shader	O
.	O
</s>
<s>
The	O
rasterization	O
step	O
is	O
the	O
final	O
step	O
before	O
the	O
fragment	O
shader	O
pipeline	B-General_Concept
that	O
all	O
primitives	B-Algorithm
are	O
rasterized	O
with	O
.	O
</s>
<s>
In	O
the	O
rasterization	O
step	O
,	O
discrete	O
fragments	O
are	O
created	O
from	O
continuous	O
primitives	B-Algorithm
.	O
</s>
<s>
In	O
this	O
stage	O
of	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
,	O
the	O
grid	O
points	O
are	O
also	O
called	O
fragments	O
,	O
for	O
the	O
sake	O
of	O
greater	O
distinctiveness	O
.	O
</s>
<s>
Furthermore	O
,	O
it	O
is	O
necessary	O
to	O
determine	O
the	O
visible	O
,	O
closer	O
to	O
the	O
observer	O
fragment	O
,	O
in	O
the	O
case	O
of	O
overlapping	O
polygons	B-General_Concept
.	O
</s>
<s>
A	O
Z-buffer	O
is	O
usually	O
used	O
for	O
this	O
so-called	O
hidden	B-Algorithm
surface	I-Algorithm
determination	I-Algorithm
.	O
</s>
<s>
The	O
color	O
of	O
a	O
fragment	O
depends	O
on	O
the	O
illumination	O
,	O
texture	O
,	O
and	O
other	O
material	O
properties	O
of	O
the	O
visible	O
primitive	B-Algorithm
and	O
is	O
often	O
interpolated	O
using	O
the	O
triangle	O
vertex	O
properties	O
.	O
</s>
<s>
To	O
prevent	O
that	O
the	O
user	O
sees	O
the	O
gradual	O
rasterization	O
of	O
the	O
primitives	B-Algorithm
,	O
double	O
buffering	O
takes	O
place	O
.	O
</s>
<s>
Since	O
the	O
multiplication	O
of	O
two	O
nonsingular	O
matrices	O
creates	O
another	O
nonsingular	O
matrix	O
,	O
the	O
entire	O
transformation	B-Algorithm
matrix	I-Algorithm
is	O
also	O
invertible	O
.	O
</s>
<s>
Therefore	O
,	O
a	O
ray	O
is	O
projected	O
at	O
the	O
cursor	O
position	O
into	O
the	O
world	O
and	O
then	O
the	O
intersection	O
of	O
this	O
ray	O
with	O
the	O
polygons	B-General_Concept
in	O
the	O
world	O
is	O
determined	O
.	O
</s>
<s>
Classic	O
graphics	O
cards	O
are	O
still	O
relatively	O
close	O
to	O
the	O
graphics	B-General_Concept
pipeline	I-General_Concept
.	O
</s>
<s>
With	O
increasing	O
demands	O
on	O
the	O
GPU	B-Architecture
,	O
restrictions	O
were	O
gradually	O
removed	O
to	O
create	O
more	O
flexibility	O
.	O
</s>
<s>
Modern	O
graphics	O
cards	O
use	O
a	O
freely	O
programmable	O
,	O
shader-controlled	O
pipeline	B-General_Concept
,	O
which	O
allows	O
direct	O
access	O
to	O
individual	O
processing	O
steps	O
.	O
</s>
<s>
To	O
relieve	O
the	O
main	O
processor	O
,	O
additional	O
processing	O
steps	O
have	O
been	O
moved	O
to	O
the	O
pipeline	B-General_Concept
and	O
the	O
GPU	B-Architecture
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
use	O
a	O
so-called	O
compute-shader	O
to	O
perform	O
any	O
calculations	O
off	O
the	O
display	O
of	O
a	O
graphic	O
on	O
the	O
GPU	B-Architecture
.	O
</s>
<s>
These	O
universal	O
calculations	O
are	O
also	O
called	O
general-purpose	B-Architecture
computing	I-Architecture
on	I-Architecture
graphics	I-Architecture
processing	I-Architecture
units	I-Architecture
,	O
or	O
GPGPU	B-Architecture
for	O
short	O
.	O
</s>
