Advanced Rendering & Shading

Size: px
Start display at page:

Download "Advanced Rendering & Shading"

Transcription

1 Advanced Rendering & Shading Seminar 3 Advanced Rendering and Shading

2 Pluto Computer room with NVidia 6600 graphics cards All remaining assignment examination slots are in this room Advanced Rendering and Shading 2

3 Preparations fxfiles.zip available for download from course web page Create effects folder and unpack into it FX Composer User Guide Introduction to the DirectX High-Level Shading Language Work at home: Use FX Composer 1.8! Advanced Rendering and Shading 3

4 FXComposer UI panels Advanced Rendering and Shading 4

5 FX Composer Editor for materials expressed in shader language Materials stored in effect files (.fx) Semantics & Annotations Tweakables Shader code (vertex and pixel) Techniques Advanced Rendering and Shading 5

6 FX Composer how to Create fxcomposer project Create new material (effect) Tweak an effect Add scene object Edit scene object properties Advanced Rendering and Shading 6

7 FXComposer configuration Not necessary for assignment! But nice to know FXComposer manual page 27 fxcomposer_config.xml standard materials fxmapping.xml semantics and annotations defaultscene.fx rendering method used by fxcomposer expressed in xml, see manual chapter 3 Advanced Rendering and Shading 7

8 Semantics & Annotations Input semantics are names used to link the given shader input to an output of the previous stage of the graphics pipeline Output semantics are used to specify how data generated by the shader should be linked to the inputs of the next stage. For example, the output semantics for a vertex shader are used to link the outputs with the interpolators in the rasterizer to generate input data for the pixel shader. Global variables can have annotations, which can be queried using effects. One or more annotations can be attached to any parameter. Annotations are metadata that can be attached to any parameter. They are specified inside of angle brackets (< >). Advanced Rendering and Shading 8

9 Semantics & Annotations float4x4 worldviewproj : WorldViewProjection; float4x4 world : World; float4x4 worldinversetranspose : WorldInverseTranspose; float4x4 viewinverse : ViewInverse; float shininess : SpecularPower < string UIWidget = "slider"; float UIMin = 1.0; float UIMax = 128.0; float UIStep = 1.0; string UIName = "specular power"; > = 30.0; Tweakable Advanced Rendering and Shading 9

10 Shader code Previous lecture... Advanced Rendering and Shading 10

11 Technique Contains a number of passes Each pass may contain a vertex and a pixel shader and device state information Profile 2.a in FXComposer examples NVidia-specific 2.a can in most instances be replaced with standard 2.0 Advanced Rendering and Shading 11

12 First.fx // An empty material, which simply transforms the vertex and sets the color. /*********** Parameters ******/ float4x4 ModelViewProj : WorldViewProjection; /*********** Vertex shader ******/ void simplevs(float4 position : POSITION, out float4 clipposition : POSITION, out float4 color : COLOR) { clipposition = mul( position, ModelViewProj); color = float4(1.0, 1.0, 0.0, 1.0); } technique simple { pass p0 {!! VertexShader = compile vs_1_1 simplevs(); } } Advanced Rendering and Shading 12

13 Green Pixel Shader first.fx is a color vertex shader PS semantics OUT: COLOR Advanced Rendering and Shading 13

14 Bulging shader Semantics: IN: POSITION, NORMAL OUT: POSITION Bulging = move vertex along normal direction Advanced Rendering and Shading 14

15 Phong reflection You have access to Gouraud shader! Per pixel instead of per vertex Move calculations to the pixel shader Advanced Rendering and Shading 15

16 Phong shader Semantics VS IN: POSITION, NORMAL OUT: POSITION, TEXCOORDn PS IN: TEXCOORDn OUT: COLOR worldnormal worldeye worldlight Intrinsic for reflection calculation: -reflect(l,n) Advanced Rendering and Shading 16

17 Phong with Bulging Bulging = move vertex along normal direction Animate to grow and shrink hint: float t : Time; Advanced Rendering and Shading 17

18 Phong with Texture kd Pick material constant from texture instead of keeping it constant Look at Texturing.fx Advanced Rendering and Shading 18

19 Phong with Bump mapping Hint: look at hemibump.fx Vertex shader Tangent space base vectors (given in object space) Normal (semantic: NORMAL) Tangent (semantic: TANGENT) Binormal (semantic: BINORMAL) Need tangent space base vectors in world space! UV for bump normal map (semantic: TEXCOORD0) Pixel shader Read bump normal from texture (vector c) Perturbed world normal = c.x*wx+c.y*wy+c.z*wz Bump normal stored in RGB space! c.xyz = tex2d(...) - (0.5,0.5,0.5) Advanced Rendering and Shading 19

20 Environment + Bump mapping Create effect that combines environment and bump mapping Hint: study hemibump.fx and reflection.fx Advanced Rendering and Shading 20

21 Animated bump heights Environment mapping + bump mapping Animate bump mapped heights Advanced Rendering and Shading 21

22 Combination Phong + environment + bump + animated bump heights + bulging Advanced Rendering and Shading 22

23 Texture twisting Advanced Rendering and Shading 23

24 Texture twisting a = twisting * (1.0/(length(uvpos.xy)+0.1)) uvpos <- TEXCOORD0 Advanced Rendering and Shading 24

25 Vertex twisting Advanced Rendering and Shading 25

26 Vertex twisting angle = twisting * length(pos.xy) Twist is performed in clip space Advanced Rendering and Shading 26

27 Mandelbrot Advanced Rendering and Shading 27

28 Mandelbrot Parameters: S: 0-10, X: -2-2, Y: -2-2 Varying input: u,v: 0-1 (TEXCOORD0) Complex function: (c_real,c_imag) = S*(u-0.5,v-0.5) + (X,Y) Iterate k times (init: (r,i)=(c_real, c_imag)) (r,i) = (r*r-i*i+c_real, 2*r*i+c_imag) If dist_square > 4 then outside else inside dist_square = r*r+i*i PS 2.0 unrolls loops! Limited number of instructions! Try ps_2_a or ps_3_0 Advanced Rendering and Shading 28

29 Wood Color lightwood = float4(0.5,0.2,0.067,1) Color darkwood = float4(0.3,0.154,0.056,1) WoodColor: lerp(lightwood, darkwood, b) (PS) Help functions: SmoothPulseTrain(e0, e1, e2, e3, period, x) Return SmoothPulse(e0, e1, e2, e3, fmod(x,period) SmoothPulse(e0, e1, e2, e3, x) Return smoothstep(e0, e1,x) smoothstep(e2, e3,x) b = SmoothPulseTrain(0.1, 0.55, 0.7, 0.95, 2, woodradius) WoodRadius (radius from z axis) (VS) perturbedpos = scaledpos.xyz + (1,0.5,0.2)*noise3d(0.5*scaledPos.xyz) r = length(perturbedpos.xy) * noise3d(0.2*scaledpos.xyz) * noise1d (0.1*scaledPos.z) ScaledPos = scale*pos. //Scale factor in reference image = 40 Noise functions from perlin.zip from the course homepage. Quality depends on tessellation! Why not noise in pixel shader? GPU Gems 2 chapter 26 if someone wants to try (might run into instruction length problems). Advanced Rendering and Shading 29

Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003

Shader Programming CgFX, OpenGL 2.0. Michael Haller 2003 Shader Programming CgFX, OpenGL 2.0 Michael Haller 2003 Outline What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set OpenGL 2.0 What is CgFX? CgFX (C for Graphics Effekt File) Supports

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

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

Sébastien Dominé, NVIDIA. CgFX

Sébastien Dominé, NVIDIA. CgFX Sébastien Dominé, NVIDIA CgFX Overview What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set Demo What is CgFX? Supports Microsoft.fx files Cg plus: Multi-pass Hardware fallbacks (techniques)

More information

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel,

EDAF80 Introduction to Computer Graphics. Seminar 3. Shaders. Michael Doggett. Slides by Carl Johan Gribel, EDAF80 Introduction to Computer Graphics Seminar 3 Shaders Michael Doggett 2017 Slides by Carl Johan Gribel, 2010-13 Today OpenGL Shader Language (GLSL) Shading theory Assignment 3: (you guessed it) writing

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

Shaders in Eve Online Páll Ragnar Pálsson

Shaders in Eve Online Páll Ragnar Pálsson Shaders in Eve Online Páll Ragnar Pálsson EVE Online Eve Online Trinity First released 2003 Proprietary graphics engine DirectX 9 (DX11 on its way) Shader Model 3 (4 & 5 in development) HLSL Turning this

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

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools Canonical Shaders for Optimal Performance Sébastien Dominé Manager of Developer Technology Tools Agenda Introduction FX Composer 1.0 High Performance Shaders Basics Vertex versus Pixel Talk to your compiler

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

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

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Programmable Shaders //per vertex inputs from main attribute aposition; attribute anormal; //outputs to frag. program varying

More information

Creating Real Shaders in FX Composer. Kevin Bjorke NVIDIA Corporation

Creating Real Shaders in FX Composer. Kevin Bjorke NVIDIA Corporation Creating Real Shaders in FX Composer Kevin Bjorke NVIDIA Corporation HLSL for both Artists and Programmers High-Level talk here at GDC Examples of what you can do in FX Composer Code details in these slides,

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

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke Whitepaper Using SAS with CgFX and FX file formats Kevin Bjorke Version 1.03 29 March 2008 Using SAS with CgFX and FX file formats What, Why, How This document covers the use of SAS (that is, Standard

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

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people GLSL Introduction Fu-Chung Huang Thanks for materials from many other people Shader Languages Currently 3 major shader languages Cg (Nvidia) HLSL (Microsoft) Derived from Cg GLSL (OpenGL) Main influences

More information

Computer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping

Computer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping Chapter XI Normal Mapping Bumpy Surfaces Image texturing only Fast Not realistic Highly tessellated mesh Realistic Slow 11-2 Surface Normal and Lighting Recall the interaction among light sources, surfaces,

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

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express Level: Intermediate Area: Graphics Programming Summary This document is an introduction to the series of samples,

More information

Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA

Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA Shaders : the sky is the limit Sébastien Dominé NVIDIA Richard Stenson SCEA Agenda FX Composer 2.0 Introductions Cross-Platform Shader Authoring FX Composer 2.0 and Production Pipelines PLAYSTATION 3 Production

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

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Shadow Buffer Theory Observation:

More information

Zeyang Li Carnegie Mellon University

Zeyang Li Carnegie Mellon University Zeyang Li Carnegie Mellon University Recap: Texture Mapping Programmable Graphics Pipeline Bump Mapping Displacement Mapping Environment Mapping GLSL Overview Perlin Noise GPGPU Map reflectance over a

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

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

Optimal Shaders Using High-Level Languages

Optimal Shaders Using High-Level Languages Optimal Shaders Using High-Level Languages The Good, The Bad, The Ugly All high level languages provide significant power and flexibility that: Make writing shaders easy Make writing slow shaders easy

More information

https://ilearn.marist.edu/xsl-portal/tool/d4e4fd3a-a3...

https://ilearn.marist.edu/xsl-portal/tool/d4e4fd3a-a3... Assessment Preview - This is an example student view of this assessment done Exam 2 Part 1 of 5 - Modern Graphics Pipeline Question 1 of 27 Match each stage in the graphics pipeline with a description

More information

High-Precision Shading and Geometry. Kevin Bjorke NVIDIA Corporation

High-Precision Shading and Geometry. Kevin Bjorke NVIDIA Corporation High-Precision Shading and Geometry Kevin Bjorke NVIDIA Corporation CPU Power Drives GPU Tools Showing Today: Two NVIDIA Tools Melody Simplify Complex Geometry Calculate UV-coord charts Generate high-res

More information

CS 464 Review. Review of Computer Graphics for Final Exam

CS 464 Review. Review of Computer Graphics for Final Exam CS 464 Review Review of Computer Graphics for Final Exam Goal: Draw 3D Scenes on Display Device 3D Scene Abstract Model Framebuffer Matrix of Screen Pixels In Computer Graphics: If it looks right then

More information

COMP371 COMPUTER GRAPHICS

COMP371 COMPUTER GRAPHICS COMP371 COMPUTER GRAPHICS SESSION 12 PROGRAMMABLE SHADERS Announcement Programming Assignment #2 deadline next week: Session #7 Review of project proposals 2 Lecture Overview GPU programming 3 GPU Pipeline

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

Pipeline Integration with FX Composer. Chris Maughan NVIDIA Corporation

Pipeline Integration with FX Composer. Chris Maughan NVIDIA Corporation Pipeline Integration with FX Composer Chris Maughan NVIDIA Corporation Agenda FX Composer 1.6 Recap DXSAS Plugins Scripting Preview of FX Composer 2 FX Composer History FX Composer 1.0 shipped last January

More information

SGI OpenGL Shader. Marc Olano SGI

SGI OpenGL Shader. Marc Olano SGI SGI OpenGL Shader Marc Olano SGI Interactive Rendering Illusion of Presence 10 30 60 frames per second Immediate response Simple appearance Multi-pass Rendering Improved appearance Build effects Per-frame

More information

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring

DirectX Programming #4. Kang, Seongtae Computer Graphics, 2009 Spring DirectX Programming #4 Kang, Seongtae Computer Graphics, 2009 Spring Programmable Shader For recent hardwares, vertex and pixel processing stage of the graphics pipeline is programmable Programmable Vertex

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

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1

Module Contact: Dr Stephen Laycock, CMP Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Computing Sciences Main Series PG Examination 2013-14 COMPUTER GAMES DEVELOPMENT CMPSME27 Time allowed: 2 hours Answer any THREE questions. (40 marks each) Notes are

More information

Shaders Part II. Traditional Rendering Pipeline

Shaders Part II. Traditional Rendering Pipeline Shaders Part II Doron Nussbaum Doron Nussbaum COMP 3501 - Shaders Part II 1 Traditional Rendering Pipeline Traditional pipeline (older graphics cards) restricts developer to texture and the 3-term lighting

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

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke

Whitepaper. Using SAS with CgFX and FX file formats. Kevin Bjorke Whitepaper Using SAS with CgFX and FX file formats Kevin Bjorke Version 1.01 - March 2008 Using SAS with CgFX and FX file formats What, Why, How This document covers the use of SAS (that is, Standard

More information

lecture 18 - ray tracing - environment mapping - refraction

lecture 18 - ray tracing - environment mapping - refraction lecture 18 - ray tracing - environment mapping - refraction Recall Ray Casting (lectures 7, 8) for each pixel (x,y) { cast a ray through that pixel into the scene, and find the closest surface along the

More information

The Rasterization Pipeline

The Rasterization Pipeline Lecture 5: The Rasterization Pipeline Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 What We ve Covered So Far z x y z x y (0, 0) (w, h) Position objects and the camera in the world

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

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

Point-Based rendering on GPU hardware. Advanced Computer Graphics 2008

Point-Based rendering on GPU hardware. Advanced Computer Graphics 2008 Point-Based rendering on GPU hardware Advanced Computer Graphics 2008 Outline Why use the GPU? Splat rasterization Image-aligned squares Perspective correct rasterization Splat shading Flat shading Gouroud

More information

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 CSE 167: Introduction to Computer Graphics Lecture #8: Lighting Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #4 due Friday, October 28 Introduction:

More information

Complex Shading Algorithms

Complex Shading Algorithms Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping

More information

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

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 CSE 167: Introduction to Computer Graphics Lecture #7: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 Announcements Thursday in-class: Midterm Can include material

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

Performance Tools. Raul Aguaviva, Sim Dietrich, and Sébastien Dominé

Performance Tools. Raul Aguaviva, Sim Dietrich, and Sébastien Dominé Performance Tools Raul Aguaviva, Sim Dietrich, and Sébastien Dominé Agenda NVPerfHUD 3.0 The tool In real life NVPerfKIT 1.0 NVShaderPerf 71.84 FX Composer 1.6 Conclusion Q&A NVPerfHUD 3.0 Debug Console

More information

Technical Report. Mesh Instancing

Technical Report. Mesh Instancing Technical Report Mesh Instancing Abstract What is Mesh Instancing? Before we talk about instancing, let s briefly talk about the way that most D3D applications work. In order to draw a polygonal object

More information

NVIDIA Tools for Artists

NVIDIA Tools for Artists NVIDIA Tools for Artists GPU Jackpot October 2004 Will Ramey Why Do We Do This? Investing in Developers Worldwide Powerful tools for building games Software Development Content Creation Performance Analysis

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

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

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer

Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Heinrich Fink 1 Thomas Weber 1 Michael Wimmer 1 1 Institute of Computer Graphics and Algorithms, Vienna University of Technology

More information

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19

CS 498 VR. Lecture 19-4/9/18. go.illinois.edu/vrlect19 CS 498 VR Lecture 19-4/9/18 go.illinois.edu/vrlect19 Review from previous lectures Image-order Rendering and Object-order Rendering Image-order Rendering: - Process: Ray Generation, Ray Intersection, Assign

More information

FX Composer 1.5. Chris Maughan

FX Composer 1.5. Chris Maughan FX Composer 1.5 Chris Maughan 1 NVIDIA FX Composer FX Composer empowers developers to create high performance shaders in an integrated development environment with real-time preview & optimization features

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

Direct Rendering of Trimmed NURBS Surfaces

Direct Rendering of Trimmed NURBS Surfaces Direct Rendering of Trimmed NURBS Surfaces Hardware Graphics Pipeline 2/ 81 Hardware Graphics Pipeline GPU Video Memory CPU Vertex Processor Raster Unit Fragment Processor Render Target Screen Extended

More information

Forward rendering. Unity 5's rendering paths. Which lights get what treatment?

Forward rendering. Unity 5's rendering paths. Which lights get what treatment? Unity 5's rendering paths Introduction to Surface Shaders Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology Deferred Shading: Deferred pass Forward Rendering:

More information

It s All Done with Mirrors. GPU Gems Showcase Kevin Bjorke, NVIDIA GDC2004

It s All Done with Mirrors. GPU Gems Showcase Kevin Bjorke, NVIDIA GDC2004 It s All Done with Mirrors GPU Gems Showcase Kevin Bjorke, NVIDIA GDC2004 Making objects shiny via reflection maps is one of the cheapest ways to add visual complexity If there s no bump map, simple cases

More information

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm

6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm 6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm In this assignment, you will add an interactive preview of the scene and solid

More information

CPSC / Texture Mapping

CPSC / Texture Mapping CPSC 599.64 / 601.64 Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory

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

OpenGL shaders and programming models that provide object persistence

OpenGL shaders and programming models that provide object persistence OpenGL shaders and programming models that provide object persistence COSC342 Lecture 22 19 May 2016 OpenGL shaders We discussed forms of local illumination in the ray tracing lectures. We also saw that

More information

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE INTRODUCTION Texturing = process that takes a surface and modifies its appearance at each location using some image, function,

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

WebGL and GLSL Basics. CS559 Fall 2015 Lecture 10 October 6, 2015

WebGL and GLSL Basics. CS559 Fall 2015 Lecture 10 October 6, 2015 WebGL and GLSL Basics CS559 Fall 2015 Lecture 10 October 6, 2015 Last time Hardware Rasterization For each point: Compute barycentric coords Decide if in or out.7,.7, -.4 1.1, 0, -.1.9,.05,.05.33,.33,.33

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

Programming Graphics Hardware. GPU Applications. Randy Fernando, Cyril Zeller

Programming Graphics Hardware. GPU Applications. Randy Fernando, Cyril Zeller GPU Applications Randy Fernando, Cyril Zeller Overview Per-Pixel Displacement Mapping with Distance Functions Percentage-Closer Soft Shadows Introduction to General-Purpose Computation on GPUs Cloth Simulation

More information

CS 4620 Program 3: Pipeline

CS 4620 Program 3: Pipeline CS 4620 Program 3: Pipeline out: Wednesday 14 October 2009 due: Friday 30 October 2009 1 Introduction In this assignment, you will implement several types of shading in a simple software graphics pipeline.

More information

NVIDIA FX Composer. Developer Presentation June 2004

NVIDIA FX Composer. Developer Presentation June 2004 NVIDIA FX Composer Developer Presentation June 2004 1 NVIDIA FX Composer FX Composer empowers developers to create high performance shaders in an integrated development environment with real-time preview

More information

Learn the fundamentals of shader writing in unity in this complete tutorial series.

Learn the fundamentals of shader writing in unity in this complete tutorial series. Learn the fundamentals of shader writing in unity in this complete tutorial series. In this Unity tutorial series we will be giving you a basic introduction to shader scripting, showing you how to write

More information

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam

THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) COMP4610/COMP6461 (Computer Graphics) Final Exam THE AUSTRALIAN NATIONAL UNIVERSITY Final Examinations(Semester 2) 2009 COMP4610/COMP6461 (Computer Graphics) Final Exam Writing Period: 3 hours duration Study Period: 15 minutes duration - you may read

More information

Technical Report. Anisotropic Lighting using HLSL

Technical Report. Anisotropic Lighting using HLSL Technical Report Anisotropic Lighting using HLSL Abstract Anisotropic Lighting Demo Anisotropic lighting is a lighting technique that does not require that the surface behave the same from different angles.

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

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

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

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014 CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014 Announcements Project 2 due Friday, Oct. 24 th Midterm Exam

More information

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY 1(84) Information Coding / Computer Graphics, ISY, LiTH TSBK 07 Computer Graphics Ingemar Ragnemalm, ISY 1(84) Lecture 5 3D graphics part 3 Illumination Illumination applied: Shading Surface detail: Mappings

More information

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

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 CSE 167: Introduction to Computer Graphics Lecture #8: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #4 due Friday, November 2 nd Introduction:

More information

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

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI Tutorial on GPU Programming #2 Joong-Youn Lee Supercomputing Center, KISTI Contents Graphics Pipeline Vertex Programming Fragment Programming Introduction to Cg Language Graphics Pipeline The process to

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

Illumination and Shading

Illumination and Shading Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or

More information

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Lecture 10: Shading Languages. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011) Lecture 10: Shading Languages Kayvon Fatahalian CMU 15-869: Graphics and Imaging Architectures (Fall 2011) Review: role of shading languages Renderer handles surface visibility tasks - Examples: clip,

More information

Rippling Reflective and Refractive Water

Rippling Reflective and Refractive Water Rippling Reflective and Refractive Water Alex Vlachos John Isidoro Chris Oat ATI Research ATI Research ATI Research One of the classic challenges of real-time computer graphics is to generate realistic

More information

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014 ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

More information

Cg 2.0. Mark Kilgard

Cg 2.0. Mark Kilgard Cg 2.0 Mark Kilgard What is Cg? Cg is a GPU shading language C/C++ like language Write vertex-, geometry-, and fragmentprocessing kernels that execute on massively parallel GPUs Productivity through a

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

Visualisatie BMT. Rendering. Arjan Kok

Visualisatie BMT. Rendering. Arjan Kok Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract

More information

Computer Graphics Coursework 1

Computer Graphics Coursework 1 Computer Graphics Coursework 1 Deadline Deadline: 4pm, 24/10/2016 4pm 23/10/2015 Outline The aim of the coursework is to modify the vertex and fragment shaders in the provided OpenGL framework to implement

More information

User Guide. DU _v04 April 2005

User Guide. DU _v04 April 2005 DU-01057-001_v04 User Guide Table of Contents Chapter 1. About FX Composer...1 1.1. System Requirements... 3 1.2. References and Recommended Reading... 3 Chapter 2. Using FX Composer...4 2.1. Panels...

More information

WebGL and GLSL Basics. CS559 Fall 2016 Lecture 14 October

WebGL and GLSL Basics. CS559 Fall 2016 Lecture 14 October WebGL and GLSL Basics CS559 Fall 2016 Lecture 14 October 24 2016 Review Hardware Rasterization For each point: Compute barycentric coords Decide if in or out.7,.7, -.4 1.1, 0, -.1.9,.05,.05.33,.33,.33

More information

Pump Up Your Pipeline

Pump Up Your Pipeline Pump Up Your Pipeline NVIDIA Developer Tools GPU Jackpot October 4004 Will Ramey Why Do We Do This? Investing in Developers Worldwide Powerful tools for building games Software Development Content Creation

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

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1) Computer Graphics Lecture 14 Bump-mapping, Global Illumination (1) Today - Bump mapping - Displacement mapping - Global Illumination Radiosity Bump Mapping - A method to increase the realism of 3D objects

More information

Game Graphics Programmers

Game Graphics Programmers Graphics INTRODUCTION - A Glimpse into what Game Graphics Programmers do - System level view of Graphics Architectures & Pipeline - Intro to Commonly used Rendering Techniques in Games Game Graphics Programmers

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

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

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley Spring 2012 Final CS184 - Foundations of Computer Graphics University of California at Berkeley Write your name HERE: Write your login HERE: Closed book. You may not use any notes or printed/electronic

More information

Graphics and Interaction Rendering pipeline & object modelling

Graphics and Interaction Rendering pipeline & object modelling 433-324 Graphics and Interaction Rendering pipeline & object modelling Department of Computer Science and Software Engineering The Lecture outline Introduction to Modelling Polygonal geometry The rendering

More information