Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Size: px
Start display at page:

Download "Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI"

Transcription

1 Tutorial on GPU Programming #2 Joong-Youn Lee Supercomputing Center, KISTI

2 Contents Graphics Pipeline Vertex Programming Fragment Programming Introduction to Cg Language

3 Graphics Pipeline The process to generate two-dimensional images from given virtual cameras and 3D objects The various pipeline stages implement the core graphics rendering algorithms Why learn the pipeline? Make sense of the various graphics algorithms Help analyze the performance bottleneck Necessary for programming GPUs

4 Graphics Pipeline The basic construction three conceptual stages Each stage can be a pipeline or parallelized Graphics performance is determined by the slowest stage Modern graphics systems: software: Application Geometry Rasterizer Image Vertex Shading Fragment Shading hardware:

5 Geometry Stage (local space polygons) eye space Modeling and Viewing Vertex Lighting Projection screen space Viewport Mapping Perspective Divide clip space Clipping (screen space lit polygon vertices) to rasterizer stage

6 Geometry Stage Transform coordinates and normal Model->world World->eye Normalize the normal vectors Compute vertex lighting Generate (if necessary) and transform texture coordinates Transform to clip space (projection that is) Assemble vertices into primitives Clip against viewing frustum Divide by w (perspective divide if applies) Viewport transformation Back face culling

7 Rasterizer Stage Per-pixel operation: assign colors to the pixels in the frame buffer (a.k.a scan conversion) Main steps: Setup Sampling (convert a primitive to fragments) Interpolation (lighting, texturing, z values, etc) Color combinations (illumination and texture colors) Visibility (depth test) Other pixel tests (alpha, stencil tests etc) Blending/compositing (frame buffer)

8 Rasterizer Stage Convert each primitive into fragments (not pixels) Fragment: transient data structures position (x,y); depth; color; texture coordinates; etc Fragments from the rasterized polygons are then selected (z buffer comparison for instance) to form the frame buffer pixels

9 Programmable GPUs So far we only discuss fixed graphics pipeline Fixed T&L algorithms Fixed Fragment processing steps New GPU trends programmable vertex and fragment processing nvidia GeForce 3 and up Latest ATI Radeon cards OpenGL 1.4 Vertex and Fragment program APIs

10

11 Vertex Program Application Geometry Rasterization Transform Lighting Tex. coord. Clipping Vertex Program Clipping Texture Fragment Fixed vertex processing (OpenGL 1.2) Programmable vertex processing Display

12 Vertex Program Assembly language interface to T&L unit GPU instruction set to perform all vertex math Reads an untransformed, unlit vertex Creates a transformed vertex Optionally creates Lights a vertex Creates texture coordinates Creates fog coordinates Creates point sizes

13 Create Vertex Programs Programs (assembly) are defined inline as character strings static const GLubyte vpgm[] = \!!VP1. 0\ DP4 o[hpos].x, c[0], v[0]; \ DP4 o[hpos].y, c[1], v[0]; \ DP4 o[hpos].z, c[2], v[0]; \ DP4 o[hpos].w, c[3], v[0]; \ MOV o[col0],v[3]; \ END";

14 Programming Model V[0] V[15] Vertex Source 16x4 registers Program Constants c[0] c[96] O[HPOS] O[COL0] O[COL1] O[FOGP] O[PSIZ] O[TEX0] O[TEX7] Vertex Program 128 instructions Vertex Output 15x4 registers 96x4 registers Temporary Registers 12x4 registers R0 R11 All quad floats

15 Instruction Set 17 instructions total (GeForce 3) MOV, MUL, ADD, MAD, DST DP3, DP4 MIN, MAX, SLT, SGE RCP, RSQ, LOG, EXP, LIT ARL

16 Processing Fragments

17 Fragment Programs Application Geometry Rasterization Texture Texture Address Texture Filter Combiner Fog Alpha, s, z tests Blending Fragment program Fog Alpha, s, z tests Blending Fragment Display Fixed fragment pipeline Programmable fragment processing

18

19 Fragment Programs Based on nvidia s GF3/4 architecture Texture shader 4 texture units 23 different texture shader operations Conventional (1D, 2D, 3D, texture rectangle, cube map) Special case (none, pass through, cull fragment) Dependent texture fetches (result of one texture lookup affects texture coords for subsequent unit) Dependent textures fetches with dot product (and optional reflection) calculations Register combiners 8 stages (general combiners) on GeForce3/4 Per-stage constants

20 Pixel Shader Based on nvidia s GF3/4 architecture Texture shader + register combiner texture shader fragment color input texture unit 0 texture program texture unit 1 texture program texture unit 2 texture program texture unit 3 texture program fragment color output register combiner

21 Texture Shader Programmable per-pixel shading calculations (dot products) single precision floating point -> double precision floating point Dependent texture reads

22 Texture Shader Texture program example: conventional 2D texture Tex # i Texture Coords (S,T,R,Q) (S i,t i,r i,q i ) Shader Operations Texture 2D Texture Fetch S i Q i T i Q i (, ) Bound Texture Target/Format 2D Any Format Output Color (R,G,B,A)

23 Texture Shader Texture program example: pass through Shader Operations Texture Fetch Bound Texture Target/Format Output Color R = Clamp0to1(S i ) (S i,t i,r i,q i ) G = Clamp0to1(T i ) None B = Clamp0to1(R i ) A = Clamp0to1(Q i ) None (R,G,B,A)

24 Register Combiner 4 RGB Inputs Texture Fetching Fragment Color Specular Color Fog Color/Factor Texture 0 Texture 1 Register Set 4 Alpha Inputs 3 RGB Outputs 3 Alpha Outputs 4 RGB Inputs 4 Alpha Inputs 3 RGB Outputs 3 Alpha Outputs Spare 0 Specular Color 6 RGB Inputs 1 Alpha Input General Combiner 0 General Combiner 1 Final Combiner

25 Register Combiner

26 Register Combiner Register-based programming All textures and colors available for each and every texture blending stage 8 Stages of blending in hardware, plus specular and fog Note that GeForce3 has 8 combiners, and 4 textures. Signed color arithmetic

27 Examples Reflective Bump Mapping

28 SIMD Machine Single Instruction Multiple Data Components of Each Vertex VS. Vertices

29 Further Reading Vertex Shader Erik Lindholm et al. A User-Programmable Vertex Engine, SIGGRAPH 2001 Pixel Shader Kekoa Proudfoot et al. A Real-Time Procedural Shading System for Programmable Graphics Hardware, SIGGRAPH 2001 Both Shaders Real-Time Rendering (Chap. 6.5, 6.6) The OpenGL Extensions Guide

30 Far more things What we have to know for GPU programming Concept of computer graphics Some mathematics OpenGL (or Direct3D) including major extensions Mechanism of graphics hardware Chapter 15 in Real-Time Rendering Assembly language for each processor

Lecture 2. Shaders, GLSL and GPGPU

Lecture 2. Shaders, GLSL and GPGPU Lecture 2 Shaders, GLSL and GPGPU Is it interesting to do GPU computing with graphics APIs today? Lecture overview Why care about shaders for computing? Shaders for graphics GLSL Computing with shaders

More information

Tutorial on GPU Programming. Joong-Youn Lee Supercomputing Center, KISTI

Tutorial on GPU Programming. Joong-Youn Lee Supercomputing Center, KISTI Tutorial on GPU Programming Joong-Youn Lee Supercomputing Center, KISTI GPU? Graphics Processing Unit Microprocessor that has been designed specifically for the processing of 3D graphics High Performance

More information

Programmable Graphics Hardware

Programmable Graphics Hardware Programmable Graphics Hardware Ian Buck Computer Systems Laboratory Stanford University Outline Why programmable graphics hardware Vertex Programs Fragment Programs CG Trends 2 Why programmable graphics

More information

1.2.3 The Graphics Hardware Pipeline

1.2.3 The Graphics Hardware Pipeline Figure 1-3. The Graphics Hardware Pipeline 1.2.3 The Graphics Hardware Pipeline A pipeline is a sequence of stages operating in parallel and in a fixed order. Each stage receives its input from the prior

More information

Rasterization Overview

Rasterization Overview Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer

More information

Rendering Objects. Need to transform all geometry then

Rendering Objects. Need to transform all geometry then Intro to OpenGL Rendering Objects Object has internal geometry (Model) Object relative to other objects (World) Object relative to camera (View) Object relative to screen (Projection) Need to transform

More information

Graphics Hardware. Instructor Stephen J. Guy

Graphics Hardware. Instructor Stephen J. Guy Instructor Stephen J. Guy Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability! Programming Examples Overview What is a GPU Evolution of GPU GPU Design Modern Features Programmability!

More information

Graphics Processing Units (GPUs) V1.2 (January 2010) Outline. High-Level Pipeline. 1. GPU Pipeline:

Graphics Processing Units (GPUs) V1.2 (January 2010) Outline. High-Level Pipeline. 1. GPU Pipeline: Graphics Processing Units (GPUs) V1.2 (January 2010) Anthony Steed Based on slides from Jan Kautz (v1.0) Outline 1. GPU Pipeline: s Lighting Rasterization Fragment Operations 2. Vertex Shaders 3. Pixel

More information

Introduction to Programmable GPUs CPSC 314. Real Time Graphics

Introduction to Programmable GPUs CPSC 314. Real Time Graphics Introduction to Programmable GPUs CPSC 314 Introduction to GPU Programming CS314 Gordon Wetzstein, 02/2011 Real Time Graphics Introduction to GPU Programming CS314 Gordon Wetzstein, 02/2011 1 GPUs vs CPUs

More information

Spring 2009 Prof. Hyesoon Kim

Spring 2009 Prof. Hyesoon Kim Spring 2009 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key

More information

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

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable

More information

Programming Graphics Hardware

Programming Graphics Hardware Tutorial 5 Programming Graphics Hardware Randy Fernando, Mark Harris, Matthias Wloka, Cyril Zeller Overview of the Tutorial: Morning 8:30 9:30 10:15 10:45 Introduction to the Hardware Graphics Pipeline

More information

Spring 2011 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim Spring 2011 Prof. Hyesoon Kim Application Geometry Rasterizer CPU Each stage cane be also pipelined The slowest of the pipeline stage determines the rendering speed. Frames per second (fps) Executes on

More information

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1 Markus Hadwiger, KAUST Reading Assignment #4 (until Feb. 23) Read (required): Programming Massively Parallel Processors book, Chapter

More information

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1 X. GPU Programming 320491: Advanced Graphics - Chapter X 1 X.1 GPU Architecture 320491: Advanced Graphics - Chapter X 2 GPU Graphics Processing Unit Parallelized SIMD Architecture 112 processing cores

More information

A Real-Time Procedural Shading System for Programmable Graphics Hardware

A Real-Time Procedural Shading System for Programmable Graphics Hardware A Real-Time Procedural Shading System for Programmable Graphics Hardware Kekoa Proudfoot William R. Mark Pat Hanrahan Stanford University Svetoslav Tzvetkov NVIDIA Corporation http://graphics.stanford.edu/projects/shading/

More information

Shaders (some slides taken from David M. course)

Shaders (some slides taken from David M. course) Shaders (some slides taken from David M. course) Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture

More information

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Tamar Shinar Computer Science & Engineering UC Riverside Raster Devices and Images Raster Devices Hearn, Baker, Carithers Raster Display Transmissive vs. Emissive Display anode

More information

3D buzzwords. Adding programmability to the pipeline 6/7/16. Bandwidth Gravity of modern computer systems

3D buzzwords. Adding programmability to the pipeline 6/7/16. Bandwidth Gravity of modern computer systems Bandwidth Gravity of modern computer systems GPUs Under the Hood Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology The bandwidth between key components

More information

Graphics Processing Unit Architecture (GPU Arch)

Graphics Processing Unit Architecture (GPU Arch) Graphics Processing Unit Architecture (GPU Arch) With a focus on NVIDIA GeForce 6800 GPU 1 What is a GPU From Wikipedia : A specialized processor efficient at manipulating and displaying computer graphics

More information

3D Rendering Pipeline

3D Rendering Pipeline 3D Rendering Pipeline Reference: Real-Time Rendering 3 rd Edition Chapters 2 4 OpenGL SuperBible 6 th Edition Overview Rendering Pipeline Modern CG Inside a Desktop Architecture Shaders Tool Stage Asset

More information

The Application Stage. The Game Loop, Resource Management and Renderer Design

The Application Stage. The Game Loop, Resource Management and Renderer Design 1 The Application Stage The Game Loop, Resource Management and Renderer Design Application Stage Responsibilities 2 Set up the rendering pipeline Resource Management 3D meshes Textures etc. Prepare data

More information

Graphics Processing Units (GPUs) V2.2 (January 2013) Jan Kautz, Anthony Steed, Tim Weyrich

Graphics Processing Units (GPUs) V2.2 (January 2013) Jan Kautz, Anthony Steed, Tim Weyrich Graphics Processing Units (GPUs) V2.2 (January 2013) Jan Kautz, Anthony Steed, Tim Weyrich Outline 1. Traditional OpenGL Pipeline: 2. Modern OpenGL Pipeline 3. Vertex Shaders 4. Pixel Shaders 5. Example:

More information

Evolution of GPUs Chris Seitz

Evolution of GPUs Chris Seitz Evolution of GPUs Chris Seitz Overview Concepts: Real-time rendering Hardware graphics pipeline Evolution of the PC hardware graphics pipeline: 1995-1998: Texture mapping and z-buffer 1998: Multitexturing

More information

Introduction to Programmable GPUs CPSC 314. Introduction to GPU Programming CS314 Gordon Wetzstein, 09/03/09

Introduction to Programmable GPUs CPSC 314. Introduction to GPU Programming CS314 Gordon Wetzstein, 09/03/09 Introduction to Programmable GPUs CPSC 314 News Homework: no new homework this week (focus on quiz prep) Quiz 2 this Friday topics: everything after transformations up until last Friday's lecture questions

More information

Vertex and Pixel Shaders:

Vertex and Pixel Shaders: Vertex and Pixel Shaders: Making the world safe for Computer Graphics Adrian Perez 15-463: Computer Graphics 2 February 27 th, 2001 Administrivia Homework 1 will be handed back on Thursday Midterm is next

More information

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal Graphics Hardware, Graphics APIs, and Computation on GPUs Mark Segal Overview Graphics Pipeline Graphics Hardware Graphics APIs ATI s low-level interface for computation on GPUs 2 Graphics Hardware High

More information

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #2 due this Friday, October

More information

CS4620/5620: Lecture 14 Pipeline

CS4620/5620: Lecture 14 Pipeline CS4620/5620: Lecture 14 Pipeline 1 Rasterizing triangles Summary 1! evaluation of linear functions on pixel grid 2! functions defined by parameter values at vertices 3! using extra parameters to determine

More information

Basics of GPU-Based Programming

Basics of GPU-Based Programming Module 1: Introduction to GPU-Based Methods Basics of GPU-Based Programming Overview Rendering pipeline on current GPUs Low-level languages Vertex programming Fragment programming High-level shading languages

More information

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

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window

More information

CS451Real-time Rendering Pipeline

CS451Real-time Rendering Pipeline 1 CS451Real-time Rendering Pipeline JYH-MING LIEN DEPARTMENT OF COMPUTER SCIENCE GEORGE MASON UNIVERSITY Based on Tomas Akenine-Möller s lecture note You say that you render a 3D 2 scene, but what does

More information

CHAPTER 1 Graphics Systems and Models 3

CHAPTER 1 Graphics Systems and Models 3 ?????? 1 CHAPTER 1 Graphics Systems and Models 3 1.1 Applications of Computer Graphics 4 1.1.1 Display of Information............. 4 1.1.2 Design.................... 5 1.1.3 Simulation and Animation...........

More information

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane Rendering Pipeline Rendering Converting a 3D scene to a 2D image Rendering Light Camera 3D Model View Plane Rendering Converting a 3D scene to a 2D image Basic rendering tasks: Modeling: creating the world

More information

Introduction to Shaders.

Introduction to Shaders. Introduction to Shaders Marco Benvegnù hiforce@gmx.it www.benve.org Summer 2005 Overview Rendering pipeline Shaders concepts Shading Languages Shading Tools Effects showcase Setup of a Shader in OpenGL

More information

Readings on graphics architecture for Advanced Computer Architecture class

Readings on graphics architecture for Advanced Computer Architecture class Readings on graphics architecture for Advanced Computer Architecture class Attached are several short readings on graphics architecture. They are a mix of application-focused and hardware-focused readings.

More information

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside CS230 : Computer Graphics Lecture 4 Tamar Shinar Computer Science & Engineering UC Riverside Shadows Shadows for each pixel do compute viewing ray if ( ray hits an object with t in [0, inf] ) then compute

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline (and its implementation on GPUs) Computer Graphics CMU 15-462/15-662, Fall 2015 What you know how to do (at this point in the course) y y z x (w, h) z x Position objects

More information

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

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský Real - Time Rendering Graphics pipeline Michal Červeňanský Juraj Starinský Overview History of Graphics HW Rendering pipeline Shaders Debugging 2 History of Graphics HW First generation Second generation

More information

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image

More information

Mattan Erez. The University of Texas at Austin

Mattan Erez. The University of Texas at Austin EE382V: Principles in Computer Architecture Parallelism and Locality Fall 2008 Lecture 10 The Graphics Processing Unit Mattan Erez The University of Texas at Austin Outline What is a GPU? Why should we

More information

Chromatic Aberration. CEDEC 2001 Tokyo, Japan

Chromatic Aberration. CEDEC 2001 Tokyo, Japan Chromatic Aberration CEDEC 2001 Tokyo, Japan Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation 2 3 Chromatic Aberration Refraction through surfaces can be wave-length dependent Examples: Crystal

More information

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 3: GPU Architecture 2 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 9) Read (required): GLSL book, chapter 4 (The OpenGL Programmable Pipeline) GPU

More information

Windowing System on a 3D Pipeline. February 2005

Windowing System on a 3D Pipeline. February 2005 Windowing System on a 3D Pipeline February 2005 Agenda 1.Overview of the 3D pipeline 2.NVIDIA software overview 3.Strengths and challenges with using the 3D pipeline GeForce 6800 220M Transistors April

More information

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics Why GPU? Chapter 1 Graphics Hardware Graphics Processing Unit (GPU) is a Subsidiary hardware With massively multi-threaded many-core Dedicated to 2D and 3D graphics Special purpose low functionality, high

More information

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11 Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

More information

CS 354R: Computer Game Technology

CS 354R: Computer Game Technology CS 354R: Computer Game Technology Texture and Environment Maps Fall 2018 Texture Mapping Problem: colors, normals, etc. are only specified at vertices How do we add detail between vertices without incurring

More information

Sung-Eui Yoon ( 윤성의 )

Sung-Eui Yoon ( 윤성의 ) Introduction to Computer Graphics and OpenGL Graphics Hardware Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/etri_cg/ Class Objectives Understand how GPUs have been evolved Understand

More information

Hardware-Assisted Relief Texture Mapping

Hardware-Assisted Relief Texture Mapping EUROGRAPHICS 0x / N.N. and N.N. Short Presentations Hardware-Assisted Relief Texture Mapping Masahiro Fujita and Takashi Kanai Keio University Shonan-Fujisawa Campus, Fujisawa, Kanagawa, Japan Abstract

More information

GeForce4. John Montrym Henry Moreton

GeForce4. John Montrym Henry Moreton GeForce4 John Montrym Henry Moreton 1 Architectural Drivers Programmability Parallelism Memory bandwidth 2 Recent History: GeForce 1&2 First integrated geometry engine & 4 pixels/clk Fixed-function transform,

More information

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Lecture 2: Graphics Pipeline Tamar Shinar Computer Science & Engineering UC Riverside Raster Devices and Images Raster Devices - raster displays show images as a rectangular array

More information

CS427 Multicore Architecture and Parallel Computing

CS427 Multicore Architecture and Parallel Computing CS427 Multicore Architecture and Parallel Computing Lecture 6 GPU Architecture Li Jiang 2014/10/9 1 GPU Scaling A quiet revolution and potential build-up Calculation: 936 GFLOPS vs. 102 GFLOPS Memory Bandwidth:

More information

Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations. CS 4620 Lecture 14 Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

More information

Graphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1

Graphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1 Graphics Hardware Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/26/07 1 From last time Texture coordinates Uses of texture maps reflectance and other surface parameters lighting

More information

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)

General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Lecture 7 Outline Last time Visibility Shading Texturing Today Texturing continued

More information

Scanline Rendering 2 1/42

Scanline Rendering 2 1/42 Scanline Rendering 2 1/42 Review 1. Set up a Camera the viewing frustum has near and far clipping planes 2. Create some Geometry made out of triangles 3. Place the geometry in the scene using Transforms

More information

3D Rasterization II COS 426

3D Rasterization II COS 426 3D Rasterization II COS 426 3D Rendering Pipeline (for direct illumination) 3D Primitives Modeling Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation

More information

Graphics Pipeline & APIs

Graphics Pipeline & APIs Graphics Pipeline & APIs CPU Vertex Processing Rasterization Fragment Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,

More information

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology

Graphics Performance Optimisation. John Spitzer Director of European Developer Technology Graphics Performance Optimisation John Spitzer Director of European Developer Technology Overview Understand the stages of the graphics pipeline Cherchez la bottleneck Once found, either eliminate or balance

More information

Advanced Rendering Techniques

Advanced Rendering Techniques Advanced Rendering Techniques Lecture Rendering Pipeline (Part I) Professor Leandro Augusto Frata Fernandes laffernandes@ic.uff.br Lecture notes available in http://www.ic.uff.br/~laffernandes/teaching/0./topicos_rendering

More information

GPU Memory Model. Adapted from:

GPU Memory Model. Adapted from: GPU Memory Model Adapted from: Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary J. Katz, University

More information

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST

CS GPU and GPGPU Programming Lecture 3: GPU Architecture 2. Markus Hadwiger, KAUST CS 380 - GPU and GPGPU Programming Lecture 3: GPU Architecture 2 Markus Hadwiger, KAUST Reading Assignment #2 (until Feb. 17) Read (required): GLSL book, chapter 4 (The OpenGL Programmable Pipeline) GPU

More information

The F-Buffer: A Rasterization-Order FIFO Buffer for Multi-Pass Rendering. Bill Mark and Kekoa Proudfoot. Stanford University

The F-Buffer: A Rasterization-Order FIFO Buffer for Multi-Pass Rendering. Bill Mark and Kekoa Proudfoot. Stanford University The F-Buffer: A Rasterization-Order FIFO Buffer for Multi-Pass Rendering Bill Mark and Kekoa Proudfoot Stanford University http://graphics.stanford.edu/projects/shading/ Motivation for this work Two goals

More information

E.Order of Operations

E.Order of Operations Appendix E E.Order of Operations This book describes all the performed between initial specification of vertices and final writing of fragments into the framebuffer. The chapters of this book are arranged

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes Last Time? Programmable GPUS Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes frame buffer depth buffer stencil buffer Stencil Buffer Homework 4 Reading for Create some geometry "Rendering

More information

Chapter 1 Introduction

Chapter 1 Introduction Graphics & Visualization Chapter 1 Introduction Graphics & Visualization: Principles & Algorithms Brief History Milestones in the history of computer graphics: 2 Brief History (2) CPU Vs GPU 3 Applications

More information

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1 graphics pipeline sequence of operations to generate an image using object-order processing primitives processed one-at-a-time

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL 1995-2015 Josef Pelikán & Alexander Wilkie CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ 1 / 31 Advances in Hardware 3D acceleration is a common feature in

More information

2.11 Particle Systems

2.11 Particle Systems 2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced

More information

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture 10 Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

More information

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský Real - Time Rendering Pipeline optimization Michal Červeňanský Juraj Starinský Motivation Resolution 1600x1200, at 60 fps Hw power not enough Acceleration is still necessary 3.3.2010 2 Overview Application

More information

3D Computer Games Technology and History. Markus Hadwiger VRVis Research Center

3D Computer Games Technology and History. Markus Hadwiger VRVis Research Center 3D Computer Games Technology and History VRVis Research Center Lecture Outline Overview of the last ten years A look at seminal 3D computer games Most important techniques employed Graphics research and

More information

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1 Programmable GPUs Real Time Graphics Virtua Fighter 1995 (SEGA Corporation) NV1 Dead or Alive 3 2001 (Tecmo Corporation) Xbox (NV2A) Nalu 2004 (NVIDIA Corporation) GeForce 6 Human Head 2006 (NVIDIA Corporation)

More information

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences Hardware Accelerated Volume Visualization Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences A Real-Time VR System Real-Time: 25-30 frames per second 4D visualization: real time input of

More information

Supplement to Lecture 22

Supplement to Lecture 22 Supplement to Lecture 22 Programmable GPUs Programmable Pipelines Introduce programmable pipelines - Vertex shaders - Fragment shaders Introduce shading languages - Needed to describe shaders - RenderMan

More information

Graphics Pipeline & APIs

Graphics Pipeline & APIs 3 2 4 Graphics Pipeline & APIs CPU Vertex Processing Rasterization Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,

More information

Shaders. Slide credit to Prof. Zwicker

Shaders. Slide credit to Prof. Zwicker Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?

More information

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping

Abstract. 2 Description of the Effects Used. 1 Introduction Phong Illumination Bump Mapping Developing a Real-Time Renderer With Optimized Shadow Volumes Mátyás Premecz (email: pmat@freemail.hu) Department of Control Engineering and Information Technology, Budapest University of Technolgy Hungary

More information

Optimisation. CS7GV3 Real-time Rendering

Optimisation. CS7GV3 Real-time Rendering Optimisation CS7GV3 Real-time Rendering Introduction Talk about lower-level optimization Higher-level optimization is better algorithms Example: not using a spatial data structure vs. using one After that

More information

Could you make the XNA functions yourself?

Could you make the XNA functions yourself? 1 Could you make the XNA functions yourself? For the second and especially the third assignment, you need to globally understand what s going on inside the graphics hardware. You will write shaders, which

More information

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager

Optimizing DirectX Graphics. Richard Huddy European Developer Relations Manager Optimizing DirectX Graphics Richard Huddy European Developer Relations Manager Some early observations Bear in mind that graphics performance problems are both commoner and rarer than you d think The most

More information

Mattan Erez. The University of Texas at Austin

Mattan Erez. The University of Texas at Austin EE382V (17325): Principles in Computer Architecture Parallelism and Locality Fall 2007 Lecture 11 The Graphics Processing Unit Mattan Erez The University of Texas at Austin Outline What is a GPU? Why should

More information

GPU Architecture and Function. Michael Foster and Ian Frasch

GPU Architecture and Function. Michael Foster and Ian Frasch GPU Architecture and Function Michael Foster and Ian Frasch Overview What is a GPU? How is a GPU different from a CPU? The graphics pipeline History of the GPU GPU architecture Optimizations GPU performance

More information

Case 1:17-cv SLR Document 1-3 Filed 01/23/17 Page 1 of 33 PageID #: 60 EXHIBIT C

Case 1:17-cv SLR Document 1-3 Filed 01/23/17 Page 1 of 33 PageID #: 60 EXHIBIT C Case 1:17-cv-00064-SLR Document 1-3 Filed 01/23/17 Page 1 of 33 PageID #: 60 EXHIBIT C Case 1:17-cv-00064-SLR Document 1-3 Filed 01/23/17 Page 2 of 33 PageID #: 61 U.S. Patent No. 7,633,506 VIZIO / Sigma

More information

Ciril Bohak. - INTRODUCTION TO WEBGL

Ciril Bohak. - INTRODUCTION TO WEBGL 2016 Ciril Bohak ciril.bohak@fri.uni-lj.si - INTRODUCTION TO WEBGL What is WebGL? WebGL (Web Graphics Library) is an implementation of OpenGL interface for cmmunication with graphical hardware, intended

More information

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important? Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information

Practical Shadow Mapping

Practical Shadow Mapping Practical Shadow Mapping Stefan Brabec Thomas Annen Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken, Germany Abstract In this paper we propose several methods that can greatly improve

More information

CS452/552; EE465/505. Clipping & Scan Conversion

CS452/552; EE465/505. Clipping & Scan Conversion CS452/552; EE465/505 Clipping & Scan Conversion 3-31 15 Outline! From Geometry to Pixels: Overview Clipping (continued) Scan conversion Read: Angel, Chapter 8, 8.1-8.9 Project#1 due: this week Lab4 due:

More information

Dave Shreiner, ARM March 2009

Dave Shreiner, ARM March 2009 4 th Annual Dave Shreiner, ARM March 2009 Copyright Khronos Group, 2009 - Page 1 Motivation - What s OpenGL ES, and what can it do for me? Overview - Lingo decoder - Overview of the OpenGL ES Pipeline

More information

Volume Graphics Introduction

Volume Graphics Introduction High-Quality Volume Graphics on Consumer PC Hardware Volume Graphics Introduction Joe Kniss Gordon Kindlmann Markus Hadwiger Christof Rezk-Salama Rüdiger Westermann Motivation (1) Motivation (2) Scientific

More information

Monday Morning. Graphics Hardware

Monday Morning. Graphics Hardware Monday Morning Department of Computer Engineering Graphics Hardware Ulf Assarsson Skärmen består av massa pixlar 3D-Rendering Objects are often made of triangles x,y,z- coordinate for each vertex Y X Z

More information

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008. CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions The Midterm Exam was given in class on Thursday, October 23, 2008. 1. [4 pts] Drawing Where? Your instructor says that objects should always be

More information

Introduction to the OpenGL Shading Language

Introduction to the OpenGL Shading Language Introduction to the OpenGL Shading Language Randi Rost Director of Developer Relations, 3Dlabs 08-Dec-2005 1 Why use graphics programmability? Graphics hardware has changed radically Fixed functionality

More information

GPU Target Applications

GPU Target Applications John Montrym Henry Moreton GPU Target Applications (Graphics Processing Unit) 1 Interactive Gaming (50M units, 10M gamers) Cinematic quality rendering in real time. Digital Content Creation (DCC) (1M prof,

More information

Models and Architectures

Models and Architectures Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation

More information

The Rendering Pipeline (1)

The Rendering Pipeline (1) The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination

More information

Deferred Rendering Due: Wednesday November 15 at 10pm

Deferred Rendering Due: Wednesday November 15 at 10pm CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

More information

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality. Last Time Modeling Transformations Illumination (Shading) Real-Time Shadows Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Graphics Pipeline Clipping Rasterization

More information