A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.

Slides:



Advertisements
Similar presentations
Tile-Based Texture Mapping on Graphics Hardware Li-Yi Wei NVIDIA.
Advertisements

COMPUTER GRAPHICS SOFTWARE.
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.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Graphics Hardware CMSC 435/634. Transform Shade Clip Project Rasterize Texture Z-buffer Interpolate Vertex Fragment Triangle A Graphics Pipeline.
Dr A Sahu Dept of Comp Sc & Engg. IIT Guwahati 1.
Prepared 5/24/2011 by T. O’Neil for 3460:677, Fall 2011, The University of Akron.
CS-378: Game Technology Lecture #9: More Mapping Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
9/25/2001CS 638, Fall 2001 Today Shadow Volume Algorithms Vertex and Pixel Shaders.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
Computer Graphics Hardware Acceleration for Embedded Level Systems Brian Murray
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Chapter.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Status – Week 277 Victor Moya.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Status – Week 260 Victor Moya. Summary shSim. shSim. GPU design. GPU design. Future Work. Future Work. Rumors and News. Rumors and News. Imagine. Imagine.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
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.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
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.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
1 Dr. Scott Schaefer Programmable Shaders. 2/30 Graphics Cards Performance Nvidia Geforce 6800 GTX 1  6.4 billion pixels/sec Nvidia Geforce 7900 GTX.
CSE Real Time Rendering Week 2. Graphics Processing 2.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Accelerated Stereoscopic Rendering using GPU François de Sorbier - Université Paris-Est France February 2008 WSCG'2008.
A User-Programmable Vertex Engine Erik Lindholm Mark Kilgard Henry Moreton NVIDIA Corporation Presented by Han-Wei Shen.
Fateme Hajikarami Spring  What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
09/25/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Shadows Stage 2 outline.
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.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 GPU.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
Programmable Shaders Dr. Scott Schaefer.
Week 2 - Friday CS361.
Programmable Pipelines
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Real-time Computer Graphics Overview
Models and Architectures
Day 05 Shader Basics.
Graphics Processing Unit
OpenGL-Rendering Pipeline
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing

Why do we need graphics hardware?

The evolution of graphics hardware SGI Origin 3400NVIDIA Geforce 7800

7 years of graphics accelenation.com/?doc=123&page=1

Ray tracing General & flexible Intuitive Global illumination Hard to accelerate

Polygonal graphics pipeline Local computation Easy to accelerate Not general Unintuitive

Graphics hierarchy Layered approach Like network layers Encapsulation Easy programming Driver optimization Driver workaround Driver simulation Protection Hardware error check

Overview Graphics pipeline Only high level overview (so you can program), not necessarily real hardware GPU programming

Graphics pipeline

Application Mostly on CPU High level work User interface Control Simulation Physics Artificial intelligence

Host Gatekeeper of GPU Command processing Error checking State management Context switch

Geometry Vertex processor Primitive assembly Clip & cull Viewport transform

Vertex Processor Process one vertex at one time No information on other vertices Programmable Transformation Lighting

Transformation Global to eye coordinate system

Lighting Diffuse Specular

Transform & Light on Vertex Processor A sequence of assembly instructions (more on this later)

Primitive Assembly Assemble individual vertices into triangle (or line or point) Performance implication A triangle is ready only when all 3 vertices are Vertex coherence & caching

Clipping & Culling Backface culling Remove triangles facing away from view Eliminate ½ of the triangles in theory Clipping against view frustum Triangles may become quadrilaterals

Viewport transform From floating point range [-1, 1] x [-1, 1] to integer range [0, height-1] x [0, width-1]

Rasterization Convert primitives (triangles, lines) into pixels Barycentric coordinate Attribute interpolation

Triangles into pixels

Attribute interpolation Interpolation Barycentric

Perspective correct interpolation incorrect correct

Fragment processor Fragment: corresponds to a single pixel and includes color, depth, and sometimes texture-coordinate values. Compute color and depth for each pixel Most interesting part of GPU

Texture Optional (though hard to avoid) Cache data Hide latency from FB Sampling/filtering I told you this last time

ROP (Raster Operation) Write to framebuffer Comparison Z, stencil, alpha, window

Framebuffer Storing buffers and textures Connect to display Characteristics Size Bandwidth Latency

Conceptual programming model Inputs (read-only) Attributes Constants Textures Registers (read-write) Used by shader Outputs (write-only) Attributes

Simple example HPOS: position COL0: diffuse color MOV o[HPOS], v[HPOS]; MOV o[COL0], v[COL0];

More complex example o[COL0] = v[COL0] + constant*v[HPOS]; MOV o[HPOS], v[HPOS]; MOV R0, v[COL0]; MAD R0, v[HPOS], c[0], R0; MOV o[COL0], R0;

Sample instruction set

A real example

High-level shading language Writing assembly is Painful Not portable Not optimize-able High level shading language solves these Cg, HLSL

Cg example

Applications Too many of them for me to describe here The only way to learn is try to program Useless for you even if I try to describe Look at developer website NVIDIA, ATI, GPGPU

Homework Try to program GPU! Even without NVIDIA GPU, you can download the emulator Stanford course on graphics hardware a-01-fall/ History of graphics hardware 7 years of graphics accelenation.com/?doc=123&page=1

S2005 Arial, Bold, 37 points This subtitle is 27 points Bullets are orange They have 110% line spacing, 6 points before/after Longer bullets in the form of a paragraph are harder to read if there is insufficient line spacing. This is the maximum recommended number of lines per slide (seven). Sub bullets look like this