SlideShare a Scribd company logo
1
Game Programming Tricks
Part I
Next-Gen Shaders
Korhan Bircan
April 8th, 2008
2
Shader Models
3
Post Processing Effects
Blur – Combine pixel color with
surrounding pixel colors
Motion Blur – Combine current frame
with previous frame(s)
Depth of Field – Blur pixel based on
their depth value
HDR effects – Bloom, lens flare etc.
Magnify bright spots
Edge Glow – Find edges and blur them
Parallax Mapping – improved bump
mapping
4
Gaussian Blur
// f(x) = a*e^-((x-b)^2)/r
// a = 1; b = 0; r = radius;
// f(x) = pow(e, -(x)^2/r)
weights[i*width + j] = pow(E, -pow(dist, 2.0)*_1_over_r) );
// usually just have a precomputed table
float4 PostProcessPS(float2 Tex : TEXCOORD0) : COLOR0
{
float4 Color = 0;
for (int i = 0; i < m_KernelSize; i++)
{
Color += tex2D(m_SrcColor,
Tex + TexelKernel[i].xy ) * weights[i];
}
return Color;
}
5
Gaussian Blur
6
Radial Blur
7
Radial Blur
8
Motion Blur
9
Depth of Field
10
Depth of Field
11
Depth of Field
12
Depth of Field
13
14
Haze
15
Haze
16
Haze
17
Haze
1
32
64
96
128
18
Haze
19
Haze – Particle System
20
High Dynamic Range (HDR) Rendering
21
HDR Rendering
22
HDR Rendering
•down filter 4x
•bright pass
•bloom horizontal
•bloom vertical
•up filter 4x
•combine
23
HDR Rendering
24
Exposure Control
25
Glow
•edge detection
•down filter 4x
•blur horizontal
•blur vertical
•combine 4x
26
Light Streaks
27
Lens Flare
28
Parallax Mapping
diffuse shading bump mapping parallax mapping
29
Bump Mapping
texture map
height map
bump map
30
Parallax Mapping
bump mapping:
naive parallax mapping:
31
Parallax Mapping
32
Steep Parallax Mapping
33
References
•Shaders for Game Programmers and Artists,
Sebastian St-Laurent
•Programming Vertex and Pixel Shaders,
Wolfgang Engel
•DirectX SDK Documentation
•NVIDIA Gpu Gems Series
•Steep Parallax Mapping, Morgan McGuire,
Max McGuire

More Related Content

PDF
Visual Impression Localization of Autonomous Robots_#CASE2015
PDF
ISCAS2013_v5
PPT
Paris Master Class 2011 - 03 Order Independent Transparency
PPTX
Fuzzy c means manual work
PPTX
Trident International Graphics Workshop 2014 4/5
PPT
Introduction To Advanced Image Processing
Visual Impression Localization of Autonomous Robots_#CASE2015
ISCAS2013_v5
Paris Master Class 2011 - 03 Order Independent Transparency
Fuzzy c means manual work
Trident International Graphics Workshop 2014 4/5
Introduction To Advanced Image Processing

What's hot (20)

PPTX
Boolean Algebra by SUKHDEEP SINGH
PPT
Fuzzy c means clustering protocol for wireless sensor networks
PDF
Pathfinding in games
PDF
Sparsity Based Super Resolution Using Color Channel Constraints
PDF
Blur Filter - Hanpo
PDF
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
PPT
CS 354 Graphics Math
PPTX
Gaussian Image Blurring in CUDA C++
PPTX
Trident International Graphics Workshop2014 3/5
PPTX
Notes on image processing
PPT
Dip Morphological
PPT
Object representations
PPTX
Chapter 9 morphological image processing
PPT
Geometry Shader-based Bump Mapping Setup
PPT
07object3d
PPTX
2. filtering basics
PDF
Test
PPTX
Computer Graphics - Hidden Line Removal Algorithm
PPTX
Region filling
Boolean Algebra by SUKHDEEP SINGH
Fuzzy c means clustering protocol for wireless sensor networks
Pathfinding in games
Sparsity Based Super Resolution Using Color Channel Constraints
Blur Filter - Hanpo
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
CS 354 Graphics Math
Gaussian Image Blurring in CUDA C++
Trident International Graphics Workshop2014 3/5
Notes on image processing
Dip Morphological
Object representations
Chapter 9 morphological image processing
Geometry Shader-based Bump Mapping Setup
07object3d
2. filtering basics
Test
Computer Graphics - Hidden Line Removal Algorithm
Region filling
Ad

Viewers also liked (10)

PDF
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
PDF
Useful Tools for Making Video Games - fmod (2008)
PDF
Background Audio Playback
PPT
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
PDF
Useful Tools for Making Video Games - XNA (2008)
PDF
Korhan bircan
PPTX
ios_summit_2016_korhan
PDF
Password Cracking with Rainbow Tables
PDF
Core Data with Swift 3.0
PPT
Bump mapping Techniques
A Practical and Robust Bump-mapping Technique for Today’s GPUs (paper)
Useful Tools for Making Video Games - fmod (2008)
Background Audio Playback
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
Useful Tools for Making Video Games - XNA (2008)
Korhan bircan
ios_summit_2016_korhan
Password Cracking with Rainbow Tables
Core Data with Swift 3.0
Bump mapping Techniques
Ad

Similar to Next-Gen shaders (2008) (20)

PDF
Gdce 2010 dx11
PDF
Scaling Deep Learning with MXNet
PPT
CS 354 Texture Mapping
PPTX
Trident International Graphics Workshop 2014 5/5
PPTX
03 image transformations_i
PDF
imageCorrectionLinearDiffusion
PPT
lec1_matlab.ppt basic all operations matlab operations
PPTX
Unity AMD FSR - SIGGRAPH 2021.pptx
PPT
Piecewise functions updated_2016
PPTX
2)-Functions-and-Graphs Presentation.pptx
PPT
ECCV2010: feature learning for image classification, part 4
PDF
RNN sharing at Trend Micro
PPTX
Online Signal Processing Assignment Help
PPT
Relations and Functions
PPT
CS 354 Acceleration Structures
PPTX
The Technology behind Shadow Warrior, ZTG 2014
PPTX
DirectX 11 Rendering in Battlefield 3
PPTX
Feature Extraction
PPTX
My favorite slides
PDF
Minko stage3d workshop_20130525
Gdce 2010 dx11
Scaling Deep Learning with MXNet
CS 354 Texture Mapping
Trident International Graphics Workshop 2014 5/5
03 image transformations_i
imageCorrectionLinearDiffusion
lec1_matlab.ppt basic all operations matlab operations
Unity AMD FSR - SIGGRAPH 2021.pptx
Piecewise functions updated_2016
2)-Functions-and-Graphs Presentation.pptx
ECCV2010: feature learning for image classification, part 4
RNN sharing at Trend Micro
Online Signal Processing Assignment Help
Relations and Functions
CS 354 Acceleration Structures
The Technology behind Shadow Warrior, ZTG 2014
DirectX 11 Rendering in Battlefield 3
Feature Extraction
My favorite slides
Minko stage3d workshop_20130525

Recently uploaded (20)

PPTX
Geodesy 1.pptx...............................................
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Construction Project Organization Group 2.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
DOCX
573137875-Attendance-Management-System-original
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Welding lecture in detail for understanding
Geodesy 1.pptx...............................................
Embodied AI: Ushering in the Next Era of Intelligent Systems
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Construction Project Organization Group 2.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
CH1 Production IntroductoryConcepts.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Lesson 3_Tessellation.pptx finite Mathematics
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
573137875-Attendance-Management-System-original
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
bas. eng. economics group 4 presentation 1.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Welding lecture in detail for understanding

Next-Gen shaders (2008)