Deferred Shading Patrick Cozzi University of Pennsylvania CIS 565 - Fall 2014.

Slides:



Advertisements
Similar presentations
“A bit more Deferred” - CryEngine 3
Advertisements

Technology Behind AMD’s “Leo Demo” Jay McKee MTS Engineer, AMD
Deferred Shading Optimizations
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
GlTF and rest3d Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Solving Some Common Problems in a Modern Deferred Rendering Engine
Light Pre-Pass -Deferred Lighting: Latest Development-
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Patrick Cozzi University of Pennsylvania CIS Fall 2013
Real-time lighting via Light Linked List 8/07/2014 Abdul Bezrati.
The Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Fall 2012.
CS 551 / 645: Introductory Computer Graphics Visible Surface Determination.
Pre-lighting in Resistance 2
Renderer Design for Multiple Lights by Wolfgang Engel 05/27/08.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
GLSL Applications: 2 of 2 Patrick Cozzi University of Pennsylvania CIS Spring 2011.
Z-Buffer Optimizations Patrick Cozzi Analytical Graphics, Inc.
GPUGI: Global Illumination Effects on the GPU
ATI GPUs and Graphics APIs Mark Segal. ATI Hardware X1K series 8 SIMD vertex engines, 16 SIMD fragment (pixel) engines 3-component vector + scalar ALUs.
Z-Buffer Optimizations Patrick Cozzi Analytical Graphics, Inc.
Rendering Engine Basics CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Outline Reprojection and data reuse Reprojection and data reuse – Taxonomy Bidirectional reprojection Bidirectional reprojection.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
4.2. D EFERRED S HADING Exploration of deferred shading (rendering)
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Advanced Computer Graphics Bas Zalmstra Marries van de Hoef Tim de Jager.
Matrices from HELL Paul Taylor Basic Required Matrices PROJECTION WORLD VIEW.
Introduction to Parallel Rendering Jian Huang, CS 594, Spring 2002.
CS 480/680 Intro Dr. Frederick C Harris, Jr. Fall 2014.
Occlusion Query. Content Occlusion culling Collision detection (convex) Etc. Fall
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
Shader Study 이동현. Vision engine   Games Helldorado The Show Warlord.
Tiled Forward Shading Johan Medeström. Project Goals Render a scene with lots of lights Learn more OpenGL and shading techniques Learn more about OpenCL/Compute.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Final Project Ideas Patrick Cozzi University of Pennsylvania CIS Fall 2014.
Final Project Ideas Patrick Cozzi University of Pennsylvania CIS Fall 2013.
A Few Things about Graphics Jian Huang Computer Science University of Tennessee.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Mobile Graphics Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
How to Create a Thousand Lights Stephen Smithbower Computer Science Undergraduate.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Ray Tracing using Programmable Graphics Hardware
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Mesh Skinning Sébastien Dominé. Agenda Introduction to Mesh Skinning 2 matrix skinning 4 matrix skinning with lighting Complex skinning for character.
Parallel Lighting Directional Lighting Distant Lighting (take your pick) Paul Taylor 2010.
GPGPU: Parallel Reduction and Scan Joseph Kider University of Pennsylvania CIS Fall 2011 Credit: Patrick Cozzi, Mark Harris Suresh Venkatensuramenan.
Engine Basics: Optimizing Geometry CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
Postmortem: Deferred Shading in Tabula Rasa Rusty Koonce NCsoft September 15, 2008.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Shaders, part 2 alexandri zavodny.
- Introduction - Graphics Pipeline
Patrick Cozzi University of Pennsylvania CIS Fall 2013
Graphics Processing Unit
Renderer Design for Multiple Lights
Deferred Lighting.
Introduction to OpenGL
Introduction to Computer Graphics with WebGL
UMBC Graphics for Games
Unity’s Standard Shader Physically Based Shading
ICG 2018 Fall Homework1 Guidance
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to OpenGL
Frame Buffer Applications
Presentation transcript:

Deferred Shading Patrick Cozzi University of Pennsylvania CIS Fall 2014

Renderer Design Design an engine that renders lots of  Objects with different materials  Dynamic lights  Different light types Cleanly. Efficiently. 2

Forward Rendering – Multi-Pass 3 foreach light { foreach visible object { Render using shader for this material/light; accumulate in framebuffer; } Pros and cons?

Forward Rendering – Multi-Pass 4 One shader per material/light-type Performance  Need to do vertex transform, rasterization, material part of fragment shader, etc. multiple times for each object.  Occluded fragments are shaded  Not all lights affect the entire object

Forward Rendering – Single Pass 5 foreach visible object { find lights affecting object; Render all lights and materials using a single shader; } Pros and cons?

Forward Rendering – Single Pass 6 Lots of shaders  One shader per material/light-combination  Hard to author shaders  May require runtime compile/link  Long ubershader increase compile times  More potential shaders to sort by Same as multi-pass  Occluded fragments are shaded  Not all lights affect the entire object

Deferred Rendering 7 foreach visible object { write properties to g-buffer; } foreach light { compute light using g-buffer; accumulate in framebuffer; } Pros and cons?

Deferred Rendering 8 Decouple lighting from scene complexity Few shaders  One per material  One per light type Only transform and rasterize each object once Only light non-occluded objects

Deferred Rendering 9 Memory bandwidth usage - read g-buffer for each light Recalculate full lighting equation for each light Limited material properties in g-buffer MSAA and translucency are difficult

G-Buffer Layout in Leadwerks Image from

G-Buffer Layout in Leadwerks Image from

G-Buffer Layout in Killzone 2 12 Image from

G-Buffer Layout in Killzone 2 13 Image from

G-Buffer Layout in Killzone 2 14 Image from

G-Buffer Layout in Killzone 2 15 Image from

G-Buffer Layout in Killzone 2 16 Image from

G-Buffer Layout in Killzone 2 17 Image from

G-Buffer Layout in Killzone 2 18 Image from

G-Buffer Layout in Killzone 2 19 Image from

G-Buffer Layout in Killzone 2 20 Image from

G-Buffer Layout in Killzone 2 21 Image from

Light Accumulation Pass Geometry for each light  Full-screen quad/triangle with scissor/stencil test  3D bounding geometry. Examples: Point light – sphere Spot light – cone Needs multiple passes. Why? 22

WebGL Demo deferred-shading/ deferred-shading/ 23

References Deferred Rendering in Killzone 2 – Michal Valient  Deferred Rendering in Leadwerks Engine - Josh Klint  Light Pre-Pass – Wolfgang Engel  Compact Normal Storage for Small G-Buffers – Aras Pranckevičius 