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.

Slides:



Advertisements
Similar presentations
Real-Time Rendering 靜宜大學資工研究所 蔡奇偉副教授 2010©.
Advertisements

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.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
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.
(conventional Cartesian reference system)
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
3D computer graphic Basis for real-time rendering and GPU architecture 劉哲宇,Liou Jhe-Yu.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
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.
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Geometric Objects and Transformations. Coordinate systems rial.html.
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
GPU Shading and Rendering Shading Technology 8:30 Introduction (:30–Olano) 9:00 Direct3D 10 (:45–Blythe) Languages, Systems and Demos 10:30 RapidMind.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
A Crash Course in HLSL Matt Christian.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 2 Graphics Hardware Pipeline, Reflection and Rendering Equations, Taxonomy of Methods
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
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.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Computer Science – Game DesignUC Santa Cruz Tile Engine.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
GPU Architecture and Its Application
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
- Introduction - Graphics Pipeline
Programmable Shaders Dr. Scott Schaefer.
Photorealistic Rendering vs. Interactive 3D Graphics
Programmable Pipelines
A Crash Course on Programmable Graphics Hardware
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
From Turing Machine to Global Illumination
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Graphics Processing Unit
Models and Architectures
CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics
Models and Architectures
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

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 section of video hardware that's typically called the Fixed Function Pipeline (FFP).  The FFP performs lighting and texture mapping in a hard-coded manner, while shaders let you replace this hard-coded approach with a programmable one.

 Pixel  Calculates actual color for a pixel  Vertex  Projects 3D points onto 2D plane (the viewport) and calculates Z depth  Geometry  Modifies existing 3D meshes or creates new ones from formulas

 The CPU sends instructions and geometry data to the GPU.  Within the vertex shader, the geometry is transformed and lighting calculations are performed.  If a geometry shader is in the graphic processing unit, some changes of the geometries in the scene are performed.  The calculated geometry is triangulated (subdivided into triangles).  Triangles are transformed into pixel quads (one pixel quad is a 2 × 2 pixel primitive).

 Real world optics and lighting are far too complex for even the fastest computers  Ray tracing which is state of the art for 3D graphics is still too complex to run in realtime for scenes of a high enough complexity to look real  Shaders are written to apply transformations to a large set of elements at a time  Modern GPUs have multiple shader pipelines

 The only type of Shader that actually shades anything  Takes a color from a texture map and modifies by the effect of various light sources on the surface  A simplified model is: Ambient+Lambertian+Specular  Ambient is fake light to avoid the need for environmental lighting to fill in shadow  Lambertian represents the coloring of a perfectly diffuse (or flat) surface  Specular highlighting is the result of a perfectly glossy surface; the real world is combination of the two.

 Large Frame Buffer  Complicated Pipeline  It’s fixed-function  But we can specify shader programs that execute in certain pipeline stages

 No random-access memory writes  Can write to current pixel in frame buffer  Can’t create data structures  Can’t traverse data structures  Can hack it using texture accesses  Hard to share data between main program and shader programs  Weird programming language  HLSL (High Level Shader Language, similar to Cg)

 Manipulate vertices and textures  Implement oversampling and interpolation techniques  Most of these computations involve matrix and vector operations  Good for Scientists and Engineers

 GLSL (OpenGL Shading Language)in OpenGL (1.5+)  HLSL (High Level Shader Language) in Microsoft Direct3D API (Direct3D 9+)  Cg (C for Graphics) developed by Nvidia for programming vertex and pixel shaders

 Early video cards had dedicated processors for different shaders (Vertex, Geometry, Pixel)  This simplified the hardware requirements for each type but was inflexible  Modern video cards (DirectX 10 and newer; GeForce 8xxx+, Radeon HD) have universal shaders which can be assigned to the different functions at the discretion of the programmer.

 There are a few early programs that attempted to use dedicated shaders for GPGPU, but the limitations make this very challenging and inefficient  Universal shaders with their increased flexibility allowed for GPGPU to really take off

 HPG2009/TimHPG2009.pdf HPG2009/TimHPG2009.pdf   _shader _shader   e,_logical%29 e,_logical%29  opengl-pixel-shaders-and-why-the-future-of- software-depends-on-it opengl-pixel-shaders-and-why-the-future-of- software-depends-on-it