5.70M
Category: informaticsinformatics

Siggraph. Graphics Gems for Games

1.

Edit this text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

2.

Edit this text to create a Heading
This subtitle
is 20 points
Graphics
Gems
for Games
Bullets are blue
Findings from Avalanche Studios
They have 110% line spacing, 2 points before & after
Longer bullets in the Emil
formPersson
of a paragraph are harder to
read if there is Senior
insufficient
line
spacing. This is the
Graphics
Programmer
maximum recommended
number of lines per slide
@_Humus_
(seven).
Sub bullets look like this

3.

Edit this text
Graphics
Gems
to create
for Games
a Heading
Particle
trimming
This subtitle
is 20 points
Merge-instancing
Bullets are blue
Phone-wire
They have Anti-Aliasing
110% line spacing, 2 points before & after
Second-Depth Anti-Aliasing
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

4.

Edit this text
Graphics
Gems
to create
for Games
a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
Particle
trimming
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

5.

Edit thistrimming
Particle
text to create a Heading
GPUs
increasingly
powerful
This subtitle
is 20more
points
ALU – Through the roof
Bullets
are blue
9700 Pro
HD 2900XT
HD 7970
10 year
(2002)
(2007)
(2012)
speedup
TEX – Pretty decent increase
They
line spacing, 2 points before & after
BW have
– Kind110%
of sluggish
33.8 GF/s
475 GF/s
3789 GF/s
112x
ALU
ROP –bullets
Glacial speed
Longer
in the form of a paragraph are harder to
TEX
2.6 GT/s
11.9 GT/s
118.4 GT/s
read if there is insufficient line spacing. This is the
19.84 GB/s
105.6 GB/s
288 GB/s
BW
ROP
bound?
maximum
recommended number
of lines
per slide
1. Draw fewer pixels
2.6 GP/s
11.9 GP/s
29.6 GP/s
ROP
(seven).
2. ???
3. Sub
look like this
Gotobullets
1
Source: Wikipedia [1]
46x
15x
11x

6.

Edit thistrimming
Particle
text to create a Heading
Typical
ROP bound
cases
This subtitle
is 20 points
Solutions
Particles
Render to low-res render target
Bullets
are blue
Clouds
Abuse MSAA
They
have 110% line spacing, 2 points before & after
Billboards
GUI elements
Longer
bullets in the form of aOur
paragraph
solution are harder to
Trim particle
polygon
to reduce
read if there is insufficient line spacing.
This
is the
maximum recommended numberwaste
of lines per slide
(seven).
Sub bullets look like this

7.

Edit thistrimming
Particle
text to create a Heading
Common
with is
large
This subtitle
20 alpha=0
points areas
Wasted fillrate
Bullets
are blue
Adjust particle geometry to minimize waste
They
have tool
110%
Automated
[2] line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

8.

Edit thistrimming
Particle
text to create a Heading
Huge
fillrate savings
This subtitle
is 20 points
Original
100%
Tight rect
69.23%
3 vertices
70.66%
8 vertices
51.90%
More vertices ⇒ Bigger saving
Bullets
are blue
4 vertices
60.16%
Diminishing returns
5 vertices
55.60%
They
have
110%
line
spacing,
2
points
before
&
after
Just Cause 2 used 4 for clouds, 8 for particle effects
6 vertices
53.94%
7 vertices
52.31%
Longer bullets in the form of a paragraph are harder
to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

9.

Edit thistrimming
Particle
text to create a Heading
First
trimming
This attempt:
subtitle Manual
is 20 points
Tedious, but proved the concept
Bullets
are blue
OK for our cloud atlas
They have
110% line spacing, 2 points before & after
> 2x performance
Dozensbullets
of atlased particle textures
Longer
in the form of a paragraph are harder to
Automatic
toolis[3]insufficient line spacing. This is the
read if there
Input:
maximum
recommended number of lines per slide
Texture and Alpha threshold
Vertex count
(seven).
Output:
Sub
bullets look like this
Optimized enclosing polygon

10.

Edit thistrimming
Particle
text to create a Heading
Algorithm
This subtitle is 20 points
Threshold alpha
Bullets
are blue
Add each solid pixel to convex hull
They have
110%
linetest
spacing, 2 points before & after
Optimize with
potential-corner
Reducebullets
hull vertex count
Longer
in the form of a paragraph are harder to
Replace least important edge
read ifRepeat
there
is hull
insufficient
line spacing. This is the
until max
vertex count
Brute-forcerecommended
through all valid edgenumber
permutations
maximum
of lines per slide
Select smallest area polygon
(seven).
Sub bullets look like this

11.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
texture
read if there is insufficient lineOriginal
spacing. This
is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

12.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient lineThresholded
spacing. This istexture
the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

13.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
hull is the
read if there is insufficient lineConvex
spacing. This
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

14.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
convex
read if there is insufficient lineReduced
spacing. This
is the hull
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

15.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
4 vertex
polygon
read if there is insufficient lineFinal
spacing.
This is the
maximum recommended number
of lines per slide
(60.16%)
(seven).
Sub bullets look like this

16.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
6 vertex
polygon
read if there is insufficient lineFinal
spacing.
This is the
(53.94%)
maximum recommended number
of lines per slide
(seven).
Sub bullets look like this

17.

Edit thistrimming
Particle
text to create a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
8 vertex
polygon
read if there is insufficient lineFinal
spacing.
This is the
(51.90%)
maximum recommended number
of lines per slide
(seven).
Sub bullets look like this

18.

Edit thistrimming
Particle
text to create a Heading
Issues
This subtitle is 20 points
Polygon extending outside original quad
Bullets
are blue
No problem for regular textures. Use CLAMP.
May cut into
neighboringline
atlas tiles

They have
110%
spacing,
2 points before & after
Compute all hulls first, reject solutions that intersect another hull.
Longer
bullets
in ifthe
of a paragraph are harder to
Revert
to aligned rect
no validform
solution remains
Performance
read
if there is insufficient line spacing. This is the
Brute-force
maximum
recommended
number
of lines per slide
Keep convex
hull vertex count reasonably
low
Filtering
(seven).
Add all four corners of a pixel (faster), or interpolate subpixel alpha values (accurate)
Sub
bullets look like this
Handling ”weird” textures
I.e. alpha != 0 at texture edge

19.

Edit this text
Graphics
Gems
to create
for Games
a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
Merge-Instancing
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

20.

Edit this text to create a Heading
Merge-Instancing
Instancing
This subtitle is 20 points
One mesh, multiple instances
Bullets
are blue
Merging
They have 110% line spacing, 2 points before & after
Multiple meshes, one instance of each
Longer bullets in the form of a paragraph are harder to
thereMultiple
is insufficient
spacing.
This of
is each?
the
read
What ifabout:
meshes,line
multiple
instances
maximum
Instancing:recommended
Multiple draw-calls number of lines per slide
Merging: Duplication of vertex data
(seven).
Merge-Instancing: One draw-call, no vertex duplication
Sub bullets look like this

21.

Edit this text to create a Heading
Merge-Instancing
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

22.

Edit this text to create a Heading
Merge-Instancing
Instancing
This subtitle is 20 points
for (int instance = 0; instance < instance_count; instance++)
for
Bullets
are=blue
(int index
0; index < index_count; index++)
VertexShader( VertexBuffer[IndexBuffer[index]], InstanceBuffer[instance]
They have 110% line spacing, 2 points before & after
Merge-Instancing
forLonger
bullets in the form of a paragraph are harder to
(int vertex = 0; vertex < vertex_count; vertex++)
{
read if there is insufficient line spacing. This is the
int instance = vertex / freq;
int instance_subindex
= vertex % number
freq;
maximum
recommended
of lines per slide
(seven).
int indexbuffer_offset = InstanceBuffer[instance].IndexOffset;
int index = IndexBuffer[indexbuffer_offset + instance_subindex];
Sub bullets look like this
VertexShader( VertexBuffer[index], InstanceBuffer[instance] );
}
);

23.

Edit this text to create a Heading
Merge-Instancing
Implemented
Cause 2 on Xbox360
This subtitle in
is Just
20 points
Draw-calls less of a problem on PS3 / PC
Bullets
are blue
Xbox360 HW lends itself to this approach
They have 110% line spacing, 2 points before & after
No hardware Input Assembly unit
Longer
in vertex
the form
of a paragraph are harder
Vertex bullets
shader does
fetching
Accessible
through
inline assembly
read
if there
is insufficient
line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this
to

24.

Edit this text to create a Heading
Merge-Instancing
Merging
odd sized
This subtitle
is 20meshes
points
Choose common frequency
Bullets
are blue
Duplicate instance data as needed
They
110% line
spacing,
2
Padhave
with degenerate
triangles
as needed
points before & after
Longer
Examplebullets in the form of a paragraph are harder to
Mesh0:
39 vertices,
Mesh1: 90 vertices
read
if there
is insufficient
line spacing. This is the
Choose frequency = 45
maximum
recommended number of lines per slide
Pad Mesh0 with 2 degenerate triangles (6 vertices)
Instances[] = {
(seven).
( Mesh0, InstanceData[0] ),
Sub bullets
look like), this
( Mesh1, InstanceData[1]
( Mesh1 + 45, InstanceData[1] ) }

25.

Edit this text
Graphics
Gems
to create
for Games
a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
Phone-wire
Anti-Aliasing
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

26.

Edit this textAA
Phone-wire
to create a Heading
Sources
of aliasing
This subtitle
is 20 points
Geometric edges
Bullets
are blue
Mostly solved by MSAA
Post-AA usually
works too
They have
110%
line spacing, 2 points before & after
Breaks down with thin geometry
Longer
bullets in the form of a paragraph are harder to
Shading
of solved is
by mipmapping
read ifSortthere
insufficient line spacing. This is the
Poorly researched / understood
maximum
recommended
number of lines per slide
Few practical
techniques for games
LEAN mapping [4]
(seven).
Sub bullets look like this

27.

Edit this textAA
Phone-wire
to create a Heading
Sources
of aliasing
This subtitle
is 20 points
Geometric edges
Bullets
are blue
Mostly solved by MSAA
Post-AA usually
works too
They have
110%
line spacing, 2 points before & after
Breaks down with thin geometry
Longer
bullets in the form of a paragraph are harder to
Shading
researched
/ understood
read ifPoorly
there
is insufficient
line spacing. This is the
Few practical techniques for games
maximum
recommended number of lines per slide
LEAN mapping
(seven).
Sub bullets look like this

28.

Edit this textAA
Phone-wire
to create a Heading
Phone-wires
This subtitle is 20 points
Common game content
Bullets
are blue
Often sub-pixel sized
They
have 110% line spacing, 2 points before & after
MSAA helps
Longer
bullets
in the form of a paragraph are harder to
… but not
that much
Breaks
at sub-sample
size
read
if there
is insufficient
line spacing. This is the
Idea
maximum recommended number of lines per slide
Let’s not be sub-pixel sized!
(seven).
Sub bullets look like this

29.

Edit this textAA
Phone-wire
to create a Heading
Phone-wires
This subtitle is 20 points
Long cylinder shapes
Bullets
are blue
Defined by center points, normal and radius
They
have 110% line spacing, 2 points before & after
Avoid going sub-pixel
Longer
in the form
Clamp bullets
radius to half-pixel
size of a paragraph are harder to
Fade
radius
ratio line spacing. This is the
read
if with
there
is reduction
insufficient
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

30.

Edit this textAA
Phone-wire
to create a Heading
Bullets are blue
// Compute what radius a pixel wide wire would have
float
pixel_radius
= w * PixelScale;
They
have 110%
line spacing, 2 points before & after
//
Clamp
radius
to pixel
size.form
Fade with
in radius
vs original.
Longer
bullets
in the
of a reduction
paragraph
are harder
to
float radius = max(actual_radius, pixel_radius);
// Compute view-space w
This subtitle is 20 points
float w = dot(ViewProj[3], float4(In.Position.xyz, 1.0f));
float
fadeif= there
actual_radius
/ radius; line
read
is insufficient
spacing. This is the
maximum
number of lines per slide
// Compute
final recommended
position
float3
position = In.Position + radius * normalize(In.Normal);
(seven).
Demo
+ source
available!
[5] this
Sub
bullets
look like

31.

Edit this textAA
Phone-wire
to off,
create
MSAA
a Heading
4x
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

32.

Edit this textAA
Phone-wire
to on,
create
MSAA
a Heading
4x
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

33.

Edit this text
Graphics
Gems
to create
for Games
a Heading
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
Second-Depth
Anti-Aliasing
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

34.

Edit this text toAnti-Aliasing
Second-Depth
create a Heading
Filtering
AA approaches
This subtitle
is 20 points
SIGGRAPH 2011 - ”Filtering Approaches for Real-Time Anti-Aliasing” [6]
Bullets
are blue
Post-AA
They have
110% line spacing, 2 points before & after
MLAA
SMAA
Longer
bullets in the form of a paragraph are harder to
FXAA
read ifDLAA
there is insufficient line spacing. This is the
Analytical approaches
maximum
recommended number of lines per slide
GPAA
(seven).
GBAA
DEAA
Sub
bullets
look like this
SDAA
[7]

35.

Edit this text toAnti-Aliasing
Second-Depth
create a Heading
Depthsubtitle
buffer and
second-depth
buffer
This
is 20
points
Depth
linear
in screen-space
Bulletsisare
blue
Simplifies edge detection
They have 110% line spacing, 2 points before & after
Enables prediction of original geometry
Longer
bullets
in the form of a paragraph are harder to
Two types
of edges
read
if there is insufficient line spacing. This is the
Creases
maximum
Silhouettesrecommended number of lines per slide
(seven).
Silhouettes require second-depth buffer
Do
pre-z
pass look
with front-face
Sub
bullets
like this culling
Alternatively, output depth to render target for back-facing geometry

36.

Edit this text toAnti-Aliasing
Second-Depth
create a Heading
Attempt
creaseiscase
first
This subtitle
20 points
Look
at depth
slopes
Bullets
are blue
Compute
intersection
point
They have
110% line
spacing, 2 points before & after
Valid if distance < one pixel
Longer
bullets in the form of a paragraph are harder to
Used if distance < half pixel
if there
is insufficient line spacing. This is the
read
If invalid,
try silhouette
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

37.

Edit this text toAnti-Aliasing
Second-Depth
create a Heading
Try assubtitle
silhouette
This
is 20 points
Neighbor
depths
Bullets are
blueuseless
Look at second-depths
They have 110% line spacing, 2 points before & after
Compute intersection point
Longer
bullets in the form of a paragraph are harder to
Used if distance < half pixel
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

38.

Edit this text toAnti-Aliasing
Second-Depth
create a Heading
Results
This subtitle is 20 points
Bullets are blue
They have 110% line spacing, 2 points before & after
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this
Demo + source available! [7]

39.

Edit this text to create a Heading
References
[1]
[2] http://en.wikipedia.org/wiki/Comparison_of_AMD_graphics_processing_units
This subtitle is 20 points
http://www.humus.name/index.php?page=News&ID=266
[3]
http://www.humus.name/index.php?page=Cool&ID=8
Bullets are blue
[4] http://www.csee.umbc.edu/~olano/papers/lean/
[5] http://www.humus.name/index.php?page=3D&ID=89
They have 110% line spacing, 2 points before & after
[6] http://iryoku.com/aacourse/
[7] http://www.humus.name/index.php?page=3D&ID=88
Longer bullets in the form of a paragraph are harder to
read if there is insufficient line spacing. This is the
maximum recommended number of lines per slide
(seven).
Sub bullets look like this

40.

Edit this
textslide
to create
This
hasaaHeading
16:9 media
window
This subtitle is 20 points
Bullets are blue
Thank you!
They have 110% line spacing, 2 points before & after
Longer bullets in the Emil
formPersson
of a paragraph are harder to
read if there is insufficient
line
spacing. This is the
Avalanche
Studios
maximum recommended
number of lines per slide
@_Humus_
(seven).
Sub bullets look like this
English     Русский Rules