From Turing Machine to Global Illumination

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Is There a Real Difference between DSPs and GPUs?
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
Control Flow Virtualization for General-Purpose Computation on Graphics Hardware Ghulam Lashari Ondrej Lhotak University of Waterloo.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
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.
Evolution of the Programmable Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Spring 2011.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
GPGPU overview. Graphics Processing Unit (GPU) GPU is the chip in computer video cards, PS3, Xbox, etc – Designed to realize the 3D graphics pipeline.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
Background image by chromosphere.deviantart.com Fella in following slides by devart.deviantart.com DM2336 Programming hardware shaders Dioselin Gonzalez.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Computer Graphics Graphics Hardware
Geometric Objects and Transformations. Coordinate systems rial.html.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
Cg Programming Mapping Computational Concepts to GPUs.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
A SEMINAR ON 1 CONTENT 2  The Stream Programming Model  The Stream Programming Model-II  Advantage of Stream Processor  Imagine’s.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Ray Tracing using Programmable Graphics Hardware
Ray Tracing by GPU Ming Ouhyoung. Outline Introduction Graphics Hardware Streaming Ray Tracing Discussion.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
Our Graphics Environment Landscape Rendering. Hardware  CPU  Modern CPUs are multicore processors  User programs can run at the same time as other.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Computer Graphics Graphics Hardware
GPU Architecture and Its Application
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
- Introduction - Graphics Pipeline
Chapter 1 An overview on Computer Graphics
Programmable Pipelines
Chapter 10 Computer Graphics
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
3D Graphics Rendering PPT By Ricardo Veguilla.
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
GPU and Effects Graphics pipeline Programmable shaders Special effects.
Interactive Computer Graphics
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
NVIDIA Fermi Architecture
Lighting.
Graphics Processing Unit
Models and Architectures
Computer Graphics Graphics Hardware
CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics
CS5500 Computer Graphics May 29, 2006
Models and Architectures
Ray Tracing on Programmable Graphics Hardware
RADEON™ 9700 Architecture and 3D Performance
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

From Turing Machine to Global Illumination

Outline My first computer (CASIO fx3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs

Calculator vs. Computer What is the difference between a calculator and a computer? Doesn’t a compute-r just “compute”? The Casio fx3600p calculated can be programmed (38 steps allowed).

Turing Machine Can be adapted to simulates the logic of any computer that could possibly be constructed. von Neumann architecture implements a universal Turing machine. Look them up at Wikipedia!

Outline My first computer (CASIO fx3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs

Simplified View The Data Flow: 3D Polygons (+Colors, Lights, Normals, Texture Coordinates…etc.) 2D Polygons 2D Pixels (I.e., Output Images) Transform (& Lighting) Rasterization

Outline My first computer (CASIO fx3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs

Global Effects shadow multiple reflection translucent surface

Local vs. Global

How Does GPU Draw This?

Quiz Q1: A straightforward GPU pipeline give us local illumination only. Why? Q2: What typical effects are missing? Hint: How is an object drawn? Do they consider the relationship with other objects? Shadow, reflection, and refraction…

Wait but I’ve seen shadow and reflection in games before… With Shadows Without Shadows

Outline My first computer (CASIO fx3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs

Adding “Memory” to the GPU Computation Modern GPUs allow: The usage of multiple textures. Rendering algorithms that use multiple passes. Transform (& Lighting) Rasterization Textures

Faked Global Illumination Shadow, Reflection, BRDF…etc. In theory, real global illumination is not possible in current graphics pipeline: Conceptually a loop of individual polygons. No interaction between polygons. Can this be changed by multi-pass rendering?

Case Study: Shadow Map Using two textures: color and depth Relatively straightforward design using pixel (fragment) shaders on GPUs.

Eye’s View Light’s View Depth/Shadow Map Image Source: Cass Everitt et al., “Hardware Shadow Mapping” NVIDIA SDK White Paper

Basic Steps of Shadow Maps Render the scene from the light’s point of view, Use the light’s depth buffer as a texture (shadow map), Projectively texture the shadow map onto the scene, Use “texture color” (comparison result) in fragment shading.

Outline My first computer (CASIO fx3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs

PC Graphics Architecture Two buses on PC: System Bus (CPU-Memory) and Peripheral I/O Bus. Before AGP: narrow path (I/O Bus) between main memory and graphics memory (for frame buffer, Z buffer, texture, vertex data…etc.) AGP and PCI-e speed up the link between host PC and graphics processor (GPU)

Source: http://www.karbosguide.com/hardware/module2d03a.htm

NVIDIA Geforce 6800

NVIDIA Geforce 8800

NVIDIA Fermi (Geforce 400 and 500 Series) From NVIDIA Fermi Architecture Whitepaper http://www.nvidia.com/content/PDF/fermi_white_papers/NVIDIA_Fermi_Compute_Architecture_Whitepaper.pdf

How to Program a GPU? Writing a 3D graphics application program Typically in DirectX or OpenGL Still CPU programming in C/C++ The APIs and drivers do the dirty work for you. Writing GPU shaders Typically in GLSL or Cg Still drawing 3D objects Working like plug-in’s to the 3D rendering pipeline

GPGPU General-purpose GPU computing No longer restricted to graphics applications. To utilize the abundant “GFLOPs” in GPU. Could be implemented in GPU shaders By clever transformation of problem domains. Textures to store the data structures However, shaders could not perform memory writes with calculated addresses (a.k.a. scatter operations)

GPU as a Parallel Computing Platform Treating GPUs as parallel machinery Not quite the same as shared-memory multi-processor. A special kind of memory hierarchy. NVIDIA CUDA Widely adopted in real-world applications OpenCL For non-NV GPUs and multi-core CPUs

Branch Divergence on GPU Warp … if x1 – x0 > y1 – y0: xMajorIteration() else: yMajorIteration() GPUs group pixels into “warps” or “wavefronts” of adjacent pixels, each of which runs on a single core of a superscalar processor. Here we assume the ray is in the first quadrant of the plane. Green threads represent rays where the slope of the ray in screen space is less than one, and blue thread have slope more than 1 At a statement where pixels within a group branch in different directions, the GPU must compute both sides of the branch, issuing no operation to a portion of the vector lanes for each branch and this is the case even if only a single thread in a warp takes a particular branch. So, while branch instructions themselves are often relatively expensive compared to arithmetic instructions, their most important cost is that divergent execution will reduce throughput by one half for each nested branch. Note that this code only handles the first quadrant; we need 2 more nested branches to handle all four quadrants in naïve implementation More branches for handling clipping to viewport Total of 8x reduction in performance for handling all cases, plus overhead for clipping branches against the viewport. We rederive the algorithm to make it branchless except for the actual hit detection. … ½ performance for each branch!

Examples

GPU Shading Effects Reflection and refraction Relief on surface Ambient occlusion and lighting

Real-Time Rendering of Splashing Water Particle system simulation for real-time interaction with terrains and dynamic objects. Reconstruction of the splash surface with 2D metaballs

Ray Tracing on GPU Using OpenCL or NVIDIA CUDA Or use NVIDIA OptiX