morphological antialiasing

29
Morphological Antialiasing Author: Alexander Reshetov Intel Labs Speaker: 李李李

Upload: chung-yuan-lee

Post on 13-Jan-2015

658 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Morphological antialiasing

Morphological AntialiasingAuthor: Alexander ReshetovIntel LabsSpeaker: 李仲元

Page 2: Morphological antialiasing

OutlineIntroductionPrevious method

◦Super Sampling Anti-Aliasing (SSAA)◦Multi Sampling Anti-Aliasing (MSAA)

Morphological Anti-Aliasing (MLAA)◦Black-and-white image◦Color image

ExperimentReference

◦Sub-pixel Reconstruction Anti-Aliasing (SRAA)

Page 3: Morphological antialiasing

IntroductionAnti-aliasing

Call of Duty: World at War

Page 4: Morphological antialiasing

Previous methodFull scene Anti-aliasing avoid

aliasing on full-screen images

Super-Sampling Anti-aliasingMultiSampling Anti-AliasingCoverageSampling Anti-AliasingCustom Filter Anti-Aliasing

Page 5: Morphological antialiasing

Previous method - SSAA

Upscale image to higher resolution

Then downsampling it to the desired size

Brute-Force method

Page 6: Morphological antialiasing

Previous method - MSAA

Like SSAA, but just do super-sampling for Z-buffer and Stencil Buffer

Assume that the change of color in one pixel is not obvious

Disadvantages :◦If the alpha value of a translucent

fragment is not within a specified range, it will be discarded after alpha testing

Page 7: Morphological antialiasing

Previous method - MSAA

Page 8: Morphological antialiasing

Previous methodDifferent Sampling method will

affect the resultHigh quality result with high costMust combine with forward

rendering

Page 9: Morphological antialiasing

Morphological Anti-AliasingAlgorithm

for black-and-white implementation

◦Step 1: Separate different color area◦Step 2: Classify separation line◦Step 3: Compute new color for cells

Page 10: Morphological antialiasing

Step 1: SeparateAssume that border pixels are extended into additional imaginary rows and columns

Page 11: Morphological antialiasing

Step 2: ClassifyLook for other separation lines

which are orthogonal to the current one at its farthest vertices

A single separation line can be a part of multiple patterns (up to four)

classify separation lines into the following three categories:◦1. Z-shaped pattern◦2. U-shaped pattern ◦3. L-shaped pattern

Page 12: Morphological antialiasing

Step 2: Classify

Page 13: Morphological antialiasing

Step 3: Compute

I) Anti-aliasing areaZ and U shapes can be split into

two L-shapes

Substep 1. consider each L-shape to be formed by a primary edge found at the first step, secondary edge found at the second step

Page 14: Morphological antialiasing

Step 3: Compute

Page 15: Morphological antialiasing

Step 3: Compute

Substep 2. Connect the middle point of the secondary edge with the remaining vertex of the primary edge

Page 16: Morphological antialiasing

Step 3: Compute

Page 17: Morphological antialiasing

Step 3: Compute

II) Computing blending weights

We calculate the area of each trapezoid attached to the primary edge and use it to compute new color of these cells as follows:

Page 18: Morphological antialiasing

Step 3: Compute

c5 = 1/3 * 0 + 2/3 * 1

d5=1/24 * 0 + 23/24 * 1

Page 19: Morphological antialiasing

Step 3: Compute

Page 20: Morphological antialiasing

Morphological Anti-AliasingAlgorithm

for color image◦Step 1: Found discontinuities in color

image◦Step 2: Classify separation line◦Step 3: Pattern search

OptimizationLimitationFeature

Page 21: Morphological antialiasing

Step 3: Pattern search

Page 22: Morphological antialiasing

Step 3: Pattern searchCan use different method to get answers

◦Solve the equation for each channel, then average the solution

◦Summing all values to form a single numerical value(assign different weights to different channels, deferring more advanced luminance processing until GPU implementation)

If the found values of hc and hd are in the [0, 1] interval, we process the tested shape, otherwise ignore it

Page 23: Morphological antialiasing

Morphological Anti-AliasingFeature

◦MLAA can be used for any image processing task and does not use any data besides color values

◦Can combine with deferred rendering, allowing for better processor utilization

◦The algorithm achieves reasonable performance without any noticeable impact

◦The “best in class” approach for anti-aliased deferred shading before Feb, 2011

Page 24: Morphological antialiasing

Morphological Anti-AliasingOptimization

◦searching for color discontinuities Each RGBA color requires 32 bits, so 4

RGBA pixels will fit into one SSE register

Limitation◦Running time depends on number of

edges For the CPU version of MLAA, processing

about 20M pixels per second on a single 3GHz core

◦Can’t respect geometric boundaries well

Page 25: Morphological antialiasing

Experiment

Top row: bitmap font;Second row: TrueType font (antialiased)Third row: MLAA processing of bitmap fontFfourth row: MLAA processingof TrueType font.Font size from left to right: 24, 12, 8, and 6

Page 26: Morphological antialiasing

Experiment

Page 27: Morphological antialiasing

Reference - SRAA

Subpixel Reconstruction Antialiasing for Deferred Shading◦Matthäus G. Chajdas, Morgan

McGuire, David Luebke◦ACM SIGGRAPH Symposium on Intera

ctive 3D Graphics and Games 2011

Page 28: Morphological antialiasing

Reference - SRAA

An efficient algorithm for antialiasing images as a post-process

Increase performance for small quality reductions

Detailed analysis of the algorithm and comparison to MLAA

Evaluation on real game scenes including texture, specular reflection, geometric aliasing, emission, and bloom

Page 29: Morphological antialiasing

Reference - SRAA