<s>
Multisample	B-Algorithm
anti-aliasing	I-Algorithm
(	O
MSAA	O
)	O
is	O
a	O
type	O
of	O
spatial	B-Algorithm
anti-aliasing	I-Algorithm
,	O
a	O
technique	O
used	O
in	O
computer	O
graphics	O
to	O
remove	O
jaggies	B-Algorithm
.	O
</s>
<s>
The	O
term	O
generally	O
refers	O
to	O
a	O
special	O
case	O
of	O
supersampling	B-Algorithm
.	O
</s>
<s>
Initial	O
implementations	O
of	O
full-scene	O
anti-aliasing	O
(	O
FSAA	O
)	O
worked	O
conceptually	O
by	O
simply	O
rendering	O
a	O
scene	O
at	O
a	O
higher	O
resolution	O
,	O
and	O
then	O
downsampling	O
to	O
a	O
lower-resolution	O
output	O
.	O
</s>
<s>
Most	O
modern	O
GPUs	B-Architecture
are	O
capable	O
of	O
this	O
form	O
of	O
anti-aliasing	O
,	O
but	O
it	O
greatly	O
taxes	O
resources	O
such	O
as	O
texture	O
,	O
bandwidth	O
,	O
and	O
fillrate	B-General_Concept
.	O
</s>
<s>
(	O
If	O
a	O
program	O
is	O
highly	O
TCL-bound	O
or	O
CPU-bound	O
,	O
supersampling	B-Algorithm
can	O
be	O
used	O
without	O
much	O
performance	O
hit	O
.	O
)	O
</s>
<s>
According	O
to	O
the	O
OpenGL	B-Application
GL_ARB_multisample	O
specification	O
,	O
"	O
multisampling	B-Algorithm
"	O
refers	O
to	O
a	O
specific	O
optimization	O
of	O
supersampling	B-Algorithm
.	O
</s>
<s>
(	O
This	O
is	O
not	O
the	O
same	O
as	O
supersampling	B-Algorithm
but	O
,	O
by	O
the	O
OpenGL	B-Application
1.5	O
specification	O
,	O
the	O
definition	O
had	O
been	O
updated	O
to	O
include	O
fully	O
supersampling	B-Algorithm
implementations	O
as	O
well	O
.	O
)	O
</s>
<s>
In	O
graphics	O
literature	O
in	O
general	O
,	O
"	O
multisampling	B-Algorithm
"	O
refers	O
to	O
any	O
special	O
case	O
of	O
supersampling	B-Algorithm
where	O
some	O
components	O
of	O
the	O
final	O
image	O
are	O
not	O
fully	O
supersampled	O
.	O
</s>
<s>
In	O
supersample	B-Algorithm
anti-aliasing	I-Algorithm
,	O
multiple	O
locations	O
are	O
sampled	O
within	O
every	O
pixel	O
,	O
and	O
each	O
of	O
those	O
samples	O
is	O
fully	O
rendered	O
and	O
combined	O
with	O
the	O
others	O
to	O
produce	O
the	O
pixel	O
that	O
is	O
ultimately	O
displayed	O
.	O
</s>
<s>
It	O
is	O
also	O
inefficient	O
,	O
as	O
aliasing	B-Error_Name
is	O
typically	O
only	O
noticed	O
in	O
some	O
parts	O
of	O
the	O
image	O
,	O
such	O
as	O
the	O
edges	O
,	O
whereas	O
supersampling	B-Algorithm
is	O
performed	O
for	O
every	O
single	O
pixel	O
.	O
</s>
<s>
In	O
multisample	B-Algorithm
anti-aliasing	I-Algorithm
,	O
if	O
any	O
of	O
the	O
multi	O
sample	O
locations	O
in	O
a	O
pixel	O
is	O
covered	O
by	O
the	O
triangle	O
being	O
rendered	O
,	O
a	O
shading	O
computation	O
must	O
be	O
performed	O
for	O
that	O
triangle	O
.	O
</s>
<s>
This	O
is	O
true	O
of	O
the	O
middle	O
of	O
triangles	O
,	O
where	O
aliasing	B-Error_Name
is	O
not	O
an	O
issue	O
.	O
</s>
<s>
(	O
Edge	B-Algorithm
detection	I-Algorithm
can	O
reduce	O
this	O
further	O
by	O
explicitly	O
limiting	O
the	O
MSAA	O
calculation	O
to	O
pixels	O
whose	O
samples	O
involve	O
multiple	O
triangles	O
,	O
or	O
triangles	O
at	O
multiple	O
depths	O
.	O
)	O
</s>
<s>
The	O
shading	O
calculation	O
is	O
not	O
the	O
only	O
operation	O
that	O
must	O
be	O
performed	O
on	O
a	O
given	O
pixel	O
;	O
multisampling	B-Algorithm
implementations	O
may	O
variously	O
sample	O
other	O
operations	O
such	O
as	O
visibility	O
at	O
different	O
sampling	O
levels	O
.	O
</s>
<s>
The	O
edges	O
of	O
polygons	O
(	O
the	O
most	O
obvious	O
source	O
of	O
aliasing	B-Error_Name
in	O
3D	O
graphics	O
)	O
are	O
anti-aliased	O
.	O
</s>
<s>
The	O
resulting	O
image	O
may	O
contain	O
aliasing	B-Error_Name
along	O
the	O
edges	O
of	O
transparent	O
objects	O
or	O
edges	O
within	O
textures	O
,	O
although	O
the	O
image	O
quality	O
will	O
be	O
no	O
worse	O
than	O
it	O
would	O
be	O
without	O
any	O
anti-aliasing	O
.	O
</s>
<s>
Because	O
multi-sampling	O
calculates	O
interior	O
polygon	O
fragments	O
only	O
once	O
per	O
pixel	O
,	O
aliasing	B-Error_Name
and	O
other	O
artifacts	O
will	O
still	O
be	O
visible	O
inside	O
rendered	O
polygons	O
where	O
fragment	O
shader	O
output	O
contains	O
high	O
frequency	O
components	O
.	O
</s>
<s>
While	O
less	O
performance-intensive	O
than	O
SSAA	O
(	O
supersampling	B-Algorithm
)	O
,	O
it	O
is	O
possible	O
in	O
certain	O
scenarios	O
(	O
scenes	O
heavy	O
in	O
complex	O
fragments	O
)	O
for	O
MSAA	O
to	O
be	O
multiple	O
times	O
more	O
intensive	O
for	O
a	O
given	O
frame	O
than	O
post	O
processing	O
anti-aliasing	O
techniques	O
such	O
as	O
FXAA	B-Algorithm
,	O
SMAA	O
and	O
MLAA	B-Algorithm
.	O
</s>
<s>
More	O
recent	O
post-processing	O
based	O
anti-aliasing	O
techniques	O
such	O
as	O
temporal	B-Algorithm
anti-aliasing	I-Algorithm
(	O
TAA	O
)	O
,	O
which	O
reduces	O
aliasing	B-Error_Name
by	O
combining	O
data	O
from	O
previously	O
rendered	O
frames	O
,	O
have	O
seen	O
the	O
reversal	O
of	O
this	O
trend	O
,	O
as	O
post-processing	O
AA	O
becomes	O
both	O
more	O
versatile	O
and	O
more	O
expensive	O
than	O
MSAA	O
,	O
which	O
cannot	O
antialias	B-Algorithm
an	O
entire	O
frame	O
alone	O
.	O
</s>
<s>
This	O
will	O
result	O
in	O
some	O
coverage	O
bits	O
being	O
set	O
for	O
multisamples	O
that	O
are	O
not	O
actually	O
located	O
within	O
the	O
rendered	O
primitive	O
,	O
and	O
can	O
cause	O
aliasing	B-Error_Name
and	O
other	O
artifacts	O
.	O
</s>
<s>
Compared	O
to	O
supersampling	B-Algorithm
,	O
multisample	B-Algorithm
anti-aliasing	I-Algorithm
can	O
provide	O
similar	O
quality	O
at	O
higher	O
performance	O
,	O
or	O
better	O
quality	O
for	O
the	O
same	O
performance	O
.	O
</s>
<s>
Most	O
modern	O
GPUs	B-Architecture
support	O
2×	O
,	O
4×	O
,	O
and	O
8×	O
MSAA	O
samples	O
.	O
</s>
