Vertex & Pixel Shaders CPS124 – Computer Graphics Ferdinand Schober.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Patrick Cozzi University of Pennsylvania CIS Fall 2013
The Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Fall 2012.
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.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
Atila OGL library “T&L emulated via Vertex Shaders”
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Evolution of the Programmable Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Spring 2011.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Computer Science – Game DesignUC Santa Cruz Adapted from Jim Whitehead’s slides Shaders Feb 18, 2011 Creative Commons Attribution 3.0 (Except copyrighted.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
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.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
Cg – C for Graphics Eric Vidal CS 280. History General graphics processing languages – Renderman shading language (1988) Assembly languages for graphics.
Background image by chromosphere.deviantart.com Fella in following slides by devart.deviantart.com DM2336 Programming hardware shaders Dioselin Gonzalez.
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.
Real-time Graphical Shader Programming with Cg (HLSL)
Graphics Hardware and Graphics in Video Games COMP136: Introduction to Computer Graphics.
Geometric Objects and Transformations. Coordinate systems rial.html.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Using Vertex Shader in DirectX 8.1 강 신 진
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.
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.
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,
Real-Time Shading Using Programmable Graphics Hardware Introduction, Setup and Examples Wan-Chun Ma National Taiwan University.
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.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Shading Languages & HW Giovanni Civati Dept. of Information Tecnology University of Milan, Italy Milan, 26 th May 2004.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSE 381 – Advanced Game Programming GLSL. Rendering Revisited.
OpenGL-ES 3.0 And Beyond Boston Photo credit :Johnson Cameraface OpenGL Basics.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
David Luebke 1 1/25/2016 Programmable Graphics Hardware.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
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.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
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 Science – Game DesignUC Santa Cruz Tile Engine.
GPU Architecture and Its Application
Programmable Shaders Dr. Scott Schaefer.
第七课 GPU & GPGPU.
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
From Turing Machine to Global Illumination
GPGPU Applications Introduction
CS451Real-time Rendering Pipeline
CSC 2231: Parallel Computer Architecture and Programming GPUs
Introduction to Programmable Hardware
Graphics Processing Unit
Computer Graphics Practical Lesson 10
RADEON™ 9700 Architecture and 3D Performance
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Presentation transcript:

Vertex & Pixel Shaders CPS124 – Computer Graphics Ferdinand Schober

Shader History I 1995/1996: 3dfx Voodoo 1 first mass market GPU, hw accelerated rasterization GLIDE API, 16bit buffers, texturing & shading Quake using OpenGL! 1998: 3dfx Voodoo 2 / Banshee AGP port, but no AGP texturing two texture units for single-pass multitexturing 1999: Nvidia Geforce 256 / Matrox G400 fixed function graphics pipeline (T&L) first hardware OpenGL support DDR memory introduction bump mapping

Shader History II 2000: 3dfx Voodoo 3 / Nvidia Geforce 2 multi-texturing unit, “Year of Nvidia”, per pixel shading, hardware transform + clipping + shading, full screen antialiasing 2001: Nvidia Geforce 3 programmable T&L 2002: Nvidia Geforce 4Ti / DirectX 9.0 first full hardware/software shader support 2003: Nvidia Geforce FX / ATI Radeon 9800XT 256-bit memory port, displacement mapping, 128-bit color precision, Ultra Shadow, AGP 8x

Current Graphic Cards Geforce FX 5950 Ultra –Graphics Core/Interface: 256-bit –Fill Rate: 3.8 billion texels/sec. –Vertices/sec.: 356 million –Textures per Pixel: 16 –Pixel Shaders (2.0)/Vertex Shaders –Supports OpenGL 1.5 / DX9.0 –UltraShadow, CineFX 2.0 Geforce FX Demo

Current Graphic Cards II ATI Radeon 9800XT –Graphics Core/Interface: 256-bit –Fill Rate: 3.3 gpixels/sec. –Vertices/sec.: 412 million –2x/4x/6x full screen antialiasing –Pixel Shaders (2.0)/Vertex Shaders –Supports OpenGL 1.5 / DX9.0 –SmartShader, Truform 2.0Truform 2.0 –VideoshaderVideoshader ATI Radeon 9800XT Demo

Pixel vs. Vertex Shaders Definition (wikipedia): “3D hardware previously used fixed-function pipelines in which, for example, one was stuck with the lighting model chosen by the hardware vendor. Graphics hardware was able to do transformation and lighting (T&L for short) on the card, but it was not flexible. A vertex shader sidesteps the T&L stage in the pipeline and lets the user add on to it. Pixel shaders operate after the geometry pipeline and before final rasterization. They operate in parallel with multitexturing to produce a final pixel color and z-value for the final, rasterization step in the graphics pipeline (where alpha blending and depth testing occur).”

Shader Languages Different Standards: Nvidia: Cg ATI: HSLS (DirectX 9) OpenGL: GL2 Provide high level language for assembler-based shading code. Use optimized (JIT) compilers to transform to highly efficient machine code. Winner yet undecided. Example Shaders

Small Example (Cg) Why Cg? –Open source compiler –Works with OpenGL & DirectX –C-like language –can be used for multiple GPUs/Platforms

Small Example (Cg) II void simpleTransform(float4 objectPosition : POSITION, float4 color : COLOR, float4 decalCoord : TEXCOORD0, float4 lightMapCoord : TEXCOORD1, out float4 clipPosition : POSITION, out float4 oColor : COLOR, out float4 oDecalCoord : TEXCOORD0, out float4 oLightMapCoord : TEXCOORD1, uniform float brightness, uniform float4x4 modelViewProjection) { clipPosition = mul(modelViewProjection, objectPosition); oColor = brightness * color; oDecalCoord = decalCoord; oLightMapCoord = lightMapCoord; } The program transforms an object-space position for a vertex by a 4x4 matrix containing the concatenation of the modeling, viewing, and projection transforms. The resulting vector is output as the clip-space position of the vertex. The per-vertex color is scaled by a floating-point parameter prior to output. Also, two texture coordinate sets are passed through unperturbed. vs.1.1 mov oT0, v7 mov oT1, v8 dp4 oPos.x, c1, v0 dp4 oPos.y, c2, v0 dp4 oPos.z, c3, v0 dp4 oPos.w, c4, v0 mul oD0, c0.x, v5

Eye Candy And now some shader eye candy: Radeon vertex shading/bump mapping demo HSLS demo Dynamic Fur Radeon 9700 demos  More in cutting-edge games lecture…

Vertex & Pixel Shaders しゅう えんしゅう えん 終演終演 The End