<s>
Supersampling	B-Algorithm
or	O
supersampling	B-Algorithm
anti-aliasing	I-Algorithm
(	O
SSAA	O
)	O
is	O
a	O
spatial	B-Algorithm
anti-aliasing	I-Algorithm
method	O
,	O
i.e.	O
</s>
<s>
a	O
method	O
used	O
to	O
remove	O
aliasing	B-Error_Name
(	O
jagged	O
and	O
pixelated	O
edges	O
,	O
colloquially	O
known	O
as	O
"	O
jaggies	B-Algorithm
"	O
)	O
from	O
images	O
rendered	O
in	O
computer	O
games	O
or	O
other	O
computer	O
programs	O
that	O
generate	O
imagery	O
.	O
</s>
<s>
Aliasing	B-Error_Name
occurs	O
because	O
unlike	O
real-world	O
objects	O
,	O
which	O
have	O
continuous	O
smooth	O
curves	O
and	O
lines	O
,	O
a	O
computer	O
screen	O
shows	O
the	O
viewer	O
a	O
large	O
number	O
of	O
small	O
squares	O
.	O
</s>
<s>
These	O
pixels	B-Algorithm
all	O
have	O
the	O
same	O
size	O
,	O
and	O
each	O
one	O
has	O
a	O
single	O
color	O
.	O
</s>
<s>
A	O
line	O
can	O
only	O
be	O
shown	O
as	O
a	O
collection	O
of	O
pixels	B-Algorithm
,	O
and	O
therefore	O
appears	O
jagged	O
unless	O
it	O
is	O
perfectly	O
horizontal	O
or	O
vertical	O
.	O
</s>
<s>
The	O
aim	O
of	O
supersampling	B-Algorithm
is	O
to	O
reduce	O
this	O
effect	O
.	O
</s>
<s>
Color	O
samples	O
are	O
taken	O
at	O
several	O
instances	O
inside	O
the	O
pixel	B-Algorithm
(	O
not	O
just	O
at	O
the	O
center	O
as	O
normal	O
)	O
,	O
and	O
an	O
average	O
color	O
value	O
is	O
calculated	O
.	O
</s>
<s>
This	O
is	O
achieved	O
by	O
rendering	O
the	O
image	O
at	O
a	O
much	O
higher	O
resolution	B-General_Concept
than	O
the	O
one	O
being	O
displayed	O
,	O
then	O
shrinking	O
it	O
to	O
the	O
desired	O
size	O
,	O
using	O
the	O
extra	O
pixels	B-Algorithm
for	O
calculation	O
.	O
</s>
<s>
The	O
result	O
is	O
a	O
downsampled	B-Algorithm
image	O
with	O
smoother	O
transitions	O
from	O
one	O
line	O
of	O
pixels	B-Algorithm
to	O
another	O
along	O
the	O
edges	O
of	O
objects	O
.	O
</s>
<s>
The	O
number	O
of	O
samples	O
determines	O
the	O
quality	O
of	O
the	O
output	B-General_Concept
.	O
</s>
<s>
Aliasing	B-Error_Name
is	O
manifested	O
in	O
the	O
case	O
of	O
2D	O
images	O
as	O
moiré	O
pattern	O
and	O
pixelated	O
edges	O
,	O
colloquially	O
known	O
as	O
"	O
jaggies	B-Algorithm
"	O
.	O
</s>
<s>
Common	O
signal	O
processing	O
and	O
image	B-Algorithm
processing	I-Algorithm
knowledge	O
suggests	O
that	O
to	O
achieve	O
perfect	O
elimination	O
of	O
aliasing	B-Error_Name
,	O
proper	O
spatial	O
sampling	B-Algorithm
at	O
the	O
Nyquist	O
rate	O
(	O
or	O
higher	O
)	O
after	O
applying	O
a	O
2D	O
Anti-aliasing	O
filter	O
is	O
required	O
.	O
</s>
<s>
As	O
this	O
approach	O
would	O
require	O
a	O
forward	O
and	O
inverse	O
fourier	B-Algorithm
transformation	I-Algorithm
,	O
computationally	O
less	O
demanding	O
approximations	O
like	O
supersampling	B-Algorithm
were	O
developed	O
to	O
avoid	O
domain	O
switches	O
by	O
staying	O
in	O
the	O
spatial	O
domain	O
(	O
"	O
image	O
domain	O
"	O
)	O
.	O
</s>
<s>
Supersampling	B-Algorithm
is	O
computationally	O
expensive	O
because	O
it	O
requires	O
much	O
greater	O
video	B-Device
card	I-Device
memory	O
and	O
memory	B-General_Concept
bandwidth	I-General_Concept
,	O
since	O
the	O
amount	O
of	O
buffer	B-General_Concept
used	O
is	O
several	O
times	O
larger	O
.	O
</s>
<s>
A	O
way	O
around	O
this	O
problem	O
is	O
to	O
use	O
a	O
technique	O
known	O
as	O
adaptive	O
supersampling	B-Algorithm
,	O
where	O
only	O
pixels	B-Algorithm
at	O
the	O
edges	O
of	O
objects	O
are	O
supersampled	O
.	O
</s>
<s>
Initially	O
only	O
a	O
few	O
samples	O
are	O
taken	O
within	O
each	O
pixel	B-Algorithm
.	O
</s>
<s>
When	O
taking	O
samples	O
within	O
a	O
pixel	B-Algorithm
,	O
the	O
sample	O
positions	O
have	O
to	O
be	O
determined	O
in	O
some	O
way	O
.	O
</s>
<s>
The	O
pixel	B-Algorithm
is	O
split	O
into	O
several	O
sub-pixels	O
,	O
and	O
a	O
sample	O
is	O
taken	O
from	O
the	O
center	O
of	O
each	O
.	O
</s>
<s>
Although	O
,	O
due	O
to	O
the	O
regular	O
nature	O
of	O
sampling	B-Algorithm
,	O
aliasing	B-Error_Name
can	O
still	O
occur	O
if	O
a	O
low	O
number	O
of	O
sub-pixels	O
is	O
used	O
.	O
</s>
<s>
Also	O
known	O
as	O
stochastic	O
sampling	B-Algorithm
,	O
it	O
avoids	O
the	O
regularity	O
of	O
grid	O
supersampling	B-Algorithm
.	O
</s>
<s>
However	O
,	O
due	O
to	O
the	O
irregularity	O
of	O
the	O
pattern	O
,	O
samples	O
end	O
up	O
being	O
unnecessary	O
in	O
some	O
areas	O
of	O
the	O
pixel	B-Algorithm
and	O
lacking	O
in	O
others	O
.	O
</s>
<s>
The	O
Poisson	O
disk	O
sampling	B-Algorithm
algorithm	O
places	O
the	O
samples	O
randomly	O
,	O
but	O
then	O
checks	O
that	O
any	O
two	O
are	O
not	O
too	O
close	O
.	O
</s>
<s>
The	O
naive	O
"	O
dart	O
throwing	O
"	O
algorithm	O
is	O
extremely	O
slow	O
for	O
large	O
data	O
sets	O
,	O
which	O
once	O
limited	O
its	O
applications	O
for	O
real-time	B-General_Concept
rendering	I-General_Concept
.	O
</s>
<s>
A	O
pixel	B-Algorithm
is	O
split	O
into	O
several	O
sub-pixels	O
,	O
but	O
a	O
sample	O
is	O
not	O
taken	O
from	O
the	O
center	O
of	O
each	O
,	O
but	O
from	O
a	O
random	O
point	O
within	O
the	O
sub-pixel	O
.	O
</s>
