Filtering theory: Battling Aliasing with Antialiasing. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Similar documents
Filtering theory: Battling Aliasing with Antialiasing. Department of Computer Engineering Chalmers University of Technology

Morphological: Sub-pixel Morhpological Anti-Aliasing [Jimenez 11] Fast AproXimatte Anti Aliasing [Lottes 09]

8/5/2012. Introduction. Transparency. Anti-Aliasing. Applications. Conclusions. Introduction

Aliasing and Antialiasing. ITCS 4120/ Aliasing and Antialiasing

Sampling and Monte-Carlo Integration

Spring 2009 Prof. Hyesoon Kim

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller

Computer Graphics. Lecture 8 Antialiasing, Texture Mapping

Architectures. Michael Doggett Department of Computer Science Lund University 2009 Tomas Akenine-Möller and Michael Doggett 1

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

CS 432 Interactive Computer Graphics

28 SAMPLING. ALIASING AND ANTI-ALIASING

Real-Time Graphics Architecture

Computer Graphics. Sampling Theory & Anti-Aliasing. Philipp Slusallek

Scan line algorithm. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 272

COMP371 COMPUTER GRAPHICS

The simplest and most obvious method to go from a continuous to a discrete image is by point sampling,

The Rasterization Pipeline

Theoretically Perfect Sensor

Spring 2011 Prof. Hyesoon Kim

Basic GPU techniques Josef Pelikán CGG MFF UK Praha.

Theoretically Perfect Sensor

Line Drawing. Foundations of Computer Graphics Torsten Möller

MSAA- Based Coarse Shading

Point-Based Rendering

Programming Graphics Hardware

A Trip Down The (2011) Rasterization Pipeline

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Resolve your Resolves Jon Story Holger Gruen AMD Graphics Products Group

CSCI 420 Computer Graphics Lecture 14. Rasterization. Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California

CS559: Computer Graphics. Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Creating soft shadows

Distribution Ray-Tracing. Programação 3D Simulação e Jogos

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Constant-Memory Order-Independent Transparency Techniques

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Ray Tracing and Sampling

Computer Graphics. Rendering. by Brian Wyvill University of Calgary. cpsc/enel P 1

CS451Real-time Rendering Pipeline

First Steps in Hardware Two-Level Volume Rendering

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Sampling, Aliasing, & Mipmaps

Evolution of GPUs Chris Seitz

Sampling, Aliasing, & Mipmaps

Volume Graphics Introduction

Computer Graphics 7 - Texture mapping, bump mapping and antialiasing

TDA361/DIT220 Computer Graphics, January 15 th 2016

MORPHOLOGICAL ANTIALIASING AND TOPOLOGICAL RECONSTRUCTION

Lecture 9: Deferred Shading. Visual Computing Systems CMU , Fall 2013

AGGREGATE G-BUFFER ANTI-ALIASING

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Drawing a Triangle (and an Intro to Sampling)

Shadow Rendering EDA101 Advanced Shading and Rendering

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

Sampling and Reconstruction

Drawing a Triangle (and an introduction to sampling)

Advanced Computer Graphics. Aliasing. Matthias Teschner. Computer Science Department University of Freiburg

CS354 Computer Graphics Sampling and Aliasing

Real-Time Hair Rendering on the GPU NVIDIA

Technical Brief. Lumenex Engine The New Standard In GPU Image Quality

Performance Analysis and Culling Algorithms

Sampling, Aliasing, & Mipmaps

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

Z-Buffer hold pixel's distance from camera. Z buffer

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

The NVIDIA GeForce 8800 GPU

INF3320 Computer Graphics and Discrete Geometry

Image Processing Tricks in OpenGL. Simon Green NVIDIA Corporation

Practical Morphological Anti-Aliasing on the GPU

Non-Linearly Quantized Moment Shadow Maps

ADAPTIVE TEMPORAL ANTIALIASING

Anti-aliasing. Images and Aliasing

Rendering Grass with Instancing in DirectX* 10

Monday Morning. Graphics Hardware

Rasterization Overview

Efficient and Scalable Shading for Many Lights

Z 3 : An Economical Hardware Technique for High-Quality Antialiasing and Order-Independent Transparency

High-Quality Surface Splatting on Today s GPUs

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Sampling II, Anti-aliasing, Texture Filtering

Computer Graphics. Chapter 4 Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Real-Time Buffer Compression. Michael Doggett Department of Computer Science Lund university

Lecture 6: Texture. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

RADEON X1000 Memory Controller

Reading. 2. Fourier analysis and sampling theory. Required: Watt, Section 14.1 Recommended:

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang

Pixels and Buffers. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

Computer Graphics. Attributes of Graphics Primitives. Somsak Walairacht, Computer Engineering, KMITL 1

Distributed Ray Tracing

Texturing. Slides done bytomas Akenine-Möller and Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Discrete Techniques. 11 th Week, Define a buffer by its spatial resolution (n m) and its depth (or precision) k, the number of

FRUSTUM-TRACED RASTER SHADOWS: REVISITING IRREGULAR Z-BUFFERS

Transcription:

Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology 1

What is aliasing? 2

Why care at all? l Quality!! l Example: Final fantasy The movie against the game In a broad way, and for most of the scenes, the only difference is in the number of samples and the quality of filtering 3

Computer graphics is a SAMPLING & FILTERING process! l Pixels Demo l Texture l Time 4

Sampling and reconstruction 5 l Sampling: from continuous signal to discrete l Reconstruction recovers the original signal l Care must be taken to avoid aliasing l Nyquist theorem: the sampling frequency should be at least 2 times the max frequency in the signal l Often impossible to know max frequency (bandlimited signal), or the max frequency is often infinite

Sampling theorem l Nyquist theorem: the sampling frequency should be at least 2 times the max frequency in the signal f=1 rpm 1 sample per revolution A little more than 1 sample/revolution 6 2 samples per revolution >2 samples per revolution

Sampling is simple, now turn to: Reconstruction l Assume we have a bandlimited signal (e.g., a texture) l Use filters for reconstruction 7

Reconstruction with box filter (nearest neighbor) 8

Reconstruction with tent filter Nearest neighbor Linear 32x32 texture 9

Reconstruction with sinc filter l In theory, the ideal filter l Not practical (infinite extension, negative) 10

Resampling Enlarging or diminishing signals l Enlarging easy: just use filter (e.g. box or tent) to compute intermediate values. l For minification, one way is to take the average of the corresponding samples Nearest neighbor 32x32 texture 11

Screen-based Antialiasing l Hard case: edge has infinite frequency l Supersampling: use more than one sample per pixel 12

Formula and examples of different schemes p( x, y) n = w c( i, x, y) i= 1 i l wi are the weights in [0,1] l c(i,x,y) is the color of sample i inside pixel 13

Jittered sampling l Regular sampling cannot eliminate aliasing only reduce it! l Why? l Because edges represent infinite frequency l Jittering replaces aliasing with noise l Example: 14

Moire example 15 Moire patterns Noise + gaussian blur (no moire patterns) Modified Tomas Akenine-Mőller by Ulf Assarsson, 2003 2004

Patterns l Texture zoomed out until square < 1 pixel 16

SSAA, MSAA and CSAA l l l Super Sampling Anti Aliasing Stores duplicate information (color, depth, stencil) for each sample and fragment shader is run for each sample. Corresponds to rendering to an oversized buffer and downfiltering. Multi Sampling Anti Aliasing Shares some information between samples. E.g: l l Frament shader only run once per fragment. Stores a color per sample and typically also a stencil and depth-value per sample Coverage Sampling Anti Aliasing Once per fragment: l Depth-value and executing the fragment shader A coverage mask per pixel: Each sample holds a 2-bit index into a storage of up to four colors per pixel 16x CSAA 17

The A-buffer Multisampling technique l Takes >1 samples per pixel, and shares compuations between samples inside a pixel l Supersampling does not share computations (depth, fragment shading) l Examples: Lighting may be computed once per pixel Texturing may be computed once per pixel l Strength: aliasing edges (and properly handling transparency) 18

19 The A-buffer l To deal better with edges: use a coverage mask per pixel l Coverage mask, depth, & color make up a fragment l During rendering fragments are discarded when possible (depth test) l When all polygons have been rendered, the fragments are merged into a visible color Allows for sorting transparent surfaces as well But costs memory

Another multisampling techniqe Quincunx 20 l Generate 2 samples per pixel at the same time l w1=0.5, w2=0.125, w3=0.125, w4=0.125, w5=0.125 (2D tent filter) l All samples gives the same effect on the image (mid pixel = 0.5, corner pixels = 4*0.125=0.5) l Was available on NVIDIA GeForce3 and up

Yet another scheme: FLIPQUAD multisampling l Recap, RGSS: One sample per row and column l Combine good stuff from RGSS and Quincunx Demo 21 l Weights: 0.25 per sample l Performs better than Quincunx

ATI Radeon 2900 From www.pcper.com 22 l Examples of 2 filter modes

More on filtering theory and practice l Especially important for texturing and filtering of textures l More about this in next lecture 23 Hand in your Muddy Cards