REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
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.
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.
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.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
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.
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
Status – Week 243 Victor Moya. Summary Current status. Current status. Tests. Tests. XBox documentation. XBox documentation. Post Vertex Shader geometry.
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.
3D computer graphic Basis for real-time rendering and GPU architecture 劉哲宇,Liou Jhe-Yu.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
What is ? Open Graphics Library A cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is used to interact with a Graphics.
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.
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.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
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.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
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 VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
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.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive.
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.
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.
Shader.
Programmable Shaders Dr. Scott Schaefer.
Programmable Pipelines
The Graphic PipeLine
A Crash Course on Programmable Graphics Hardware
Graphics on GPU © David Kirk/NVIDIA and Wen-mei W. Hwu,
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
Real-time Computer Graphics Overview
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Programmable Hardware
Graphics Processing Unit
Programming with OpenGL Part 3: Shaders
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume Graphics [02] GPU Programming RTVG4Me

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Graphics Processor Host Cull/Clip/Setup Z-CullRasterization Fragment Crossbar Texture Cache Memory Partition Memory Partition Memory Partition Memory Partition Vertex Processors Fragment Processors Memory Access Z-Compare and Blending Example NVidia Geforce6

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 PC Architecture CPU North Bridge System Memory South Bridge GPU Video Memory 6.4 GB/s up to 8 GB/s up to 35 GB/s

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Raster- Bild Pixels Graphics Hardware VerticesPrimitives Fragments Geometry Processing Fragment Operations Scene Description Raster Image Rasterization

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 What can the hardware do? Rasterization Decomposition into fragments Interpolation of color Texturing Interpolation/Filtering Fragment Shading Fragment Operations Depth Test (Z-Test) Alpha Blending (Compositing)

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Geometry Processing Per-Vertex Lighting Projective Transform. Primitive Assembly Affine Transform. Multiplication with Transforma- tion Matrix Per-Vertex Local Illumination (Blinn/Phong) Geometric Primitives (Points, Lines Triangles) Primitives Transformation to Canonical Viewing Volume Vertices Geometry Processing Rasterization Fragment Operations

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Geometry Processing Rasterization Fragment Operations Geometry Processing Rasterization Fragment Operations Texture Fetch Texture Application Polygon Rasterization Per-Vertex Lighting Projective Transform. Primitive Assembly Affine Transform. Multiplication with Transforma- tion Matrix Per-Vertex Local Illumination (Blinn/Phong) Geometric Primitives (Points, Lines Triangles) Primitive Transformation to Canonical Viewing Volume Vertices Decomposition of primitives into fragments Interpolation of texture coordinates Filtering of texture color Combination of primary color with texture color PrimitivesFragments Geometry ProcessingRasterization

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Fragments Combine the fragment color with the color already in the frame buffer Texture Fetch Texture Application Polygon Rasterization Decomposition of primitives into fragments Interpolation of texture coordinates Filtering of texture color Combination of primary color with texture color PrimitivesFragments Fragment Operations Stencil Test Alpha Blending Depth Test Alpha Test Discard all fragments within a certain alpha range Discard a fragment if the stencil buffer is set Discard all occluded fragments Rasterization Geometry Processing Rasterization Fragment Operations

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Raster- Bild Pixels Graphics Hardware VerticesPrimitives Fragments Geometry Processing Fragment Operations Scene Description Raster Image Rasterization Vertex Shader Fragment Shader Programmable Pipeline

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Vertex Shader Important Features: Vertex Shader has information about one single Vertex only (no topological information)! For each set of vertex-attributes, the vertex shader generates exactly one vertex The vertex shader cannot create additional vertices! The vertex shader cannot discard vertices from the stream! The term „shader“ is somehow misleading, since the vertex shader can change the geometry!

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Vertex Shader Instructions Assembly-Language, such as ABSabsolute value ADDaddition DP3scalar product (dot product) DP4scalar product 4-components DSTdistance vector LITillumination terms MULmultiplication MADmultiply and add SUBsubtraction XPDcross product Most commands are vector commands (4 components)

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 High-Level Shading Languages Who wants to write assembler code? Stanford Shading Language Cg (developed by Nvidia) for OpenGL and DirectX DirectX 9.0 HLSL (DirectX only, Syntax similar to Cg) GLSL (OpenGL shading language) Syntax similar to C plus vector variables und vector instructions: float4 v1; // same as float v1[4] in C int3 v2; // same as int v2[3] in C Swizzling: float4 v3 = v1.xzzy;

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Programmable Vertex Processor copy vertex attributes to input registers Begin Vertex Fetch next instruction Read input- or temporary registers Mapping: Negation Swizzling Execute command Write to output or temp. registers Vertex Program Instructions Input- Registers Temporary Registers Output- Registers Finished? no yes Emit Vertex

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Write to output or temporary registers execute instruction Texture Instruction? Mapping: Negation Swizzling Read input of temporary registers Fragment Processor copy fragment attributes to Input register Begin Fragment Fetch next instruction Output Registers no yes Emit Fragment Finished? interpolate texel color Calculate texture address and sample texture Texture Memory yes no Fragment Program Instructions Input- Registers Temporary Registers

REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Phong Shading Per-Pixel Lighting: Local illumination in a fragement shader void main(float4 position : TEXCOORD0, float3 normal : TEXCOORD1, out float4 oColor : COLOR, uniform float3 ambientCol, uniform float3 lightCol, uniform float3 lightPos, uniform float3 eyePos, uniform float3 Ka, uniform float3 Kd, uniform float3 Ks, uniform float shiny) { float3 P = position.xyz; float3 N = normal; float3 V = normalize(eyePosition - P); float3 H = normalize(L + V); float3 ambient = Ka * ambientCol; float3 L = normalize(lightPos - P); float diffLight = max(dot(L, N), 0); float3 diffuse = Kd * lightCol * diffLight; float specLight = pow(max(dot(H, N), 0), shiny); float3 specular = Ks * lightCol * specLight; oColor.xyz = ambient + diffuse + specular; oColor.w = 1; }