Lecture 9 --- Rendering pipeline, shaders and effects 1Elias Holmlid.

Slides:



Advertisements
Similar presentations
Perspective aperture ygyg yryr n zgzg y s = y g (n/z g ) ysys y s = y r (n/z r ) zrzr.
Advertisements

Cs /11/2003 Page 1 Special Image Effects Particle Systems Fog Lens Flares Shadows Programmable Shaders.
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
GlTF and rest3d Patrick Cozzi University of Pennsylvania CIS Fall 2013.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Projective Texture Mapping
Advanced Rendering MATERIALS, POSTEFFECTS AND SCENE COMPOSITION GDC
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.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Point Rendering for Impostors Andreas Bærentzen IMM.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Pixel Shader Vertex Shader The Real-time Graphics Pipeline Input Assembler Rasterizer Output Merger.
CSE 381 – Advanced Game Programming Shading.
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.
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.
May 8, 2007Farid Harhad and Alaa Shams CS7080 Over View of the GPU Architecture CS7080 Class Project Supervised by: Dr. Elias Khalaf By: Farid Harhad &
Geometric Objects and Transformations. Coordinate systems rial.html.
Shading. What is Shading? Assigning of a color to a pixel in the final image. So, everything in shading is about how to select and combine colors to get.
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.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
A SEMINAR ON 1 CONTENT 2  The Stream Programming Model  The Stream Programming Model-II  Advantage of Stream Processor  Imagine’s.
Havok FX Physics on NVIDIA GPUs. Copyright © NVIDIA Corporation 2004 What is Effects Physics? Physics-based effects on a massive scale 10,000s of objects.
谢程、赵紫晶 郑人杰、李建锋. Shading with lambert and phong shaders Lighting by point light, directional light and spotlight.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Maths & Technologies for Games Advanced Graphics: Scene Post-Processing CO3303 Week
Real-Time Relief Mapping on Arbitrary Polygonal Surfaces Fabio Policarpo Manuel M. Oliveira Joao L. D. Comba.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lecture Cameras and lights 1Elias Holmlid.  First part  Cameras  Lights ▪ Light types ▪ Light models ▪ How light is computed  Second part 
Lecture Building a 3D-game using XNA 1Elias Holmlid.
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
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.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Shaders, part 2 alexandri zavodny.
- Introduction - Graphics Pipeline
Software Engineering and Game Development
Reflective Shadow Mapping By: Mitchell Allen.
Photorealistic Rendering vs. Interactive 3D Graphics
Alias/Autodesk Maya 第三組 林秉賢.
Graphics Processing Unit
Introduction to OpenGL
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Real-time Computer Graphics Overview
Graphics Processing Unit
Introduction to Computer Graphics with WebGL
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
Texture and Shadow Mapping
Unity’s Standard Shader Physically Based Shading
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
03 | Creating, Texturing and Moving Objects
Introduction to OpenGL
Frame Buffer Applications
Computer Graphics Introducing DirectX
Final Project Topic Discussion
Presentation transcript:

Lecture Rendering pipeline, shaders and effects 1Elias Holmlid

 First part:  The rendering pipeline  Effects & shaders overview  XNA, HLSL & Effects  Shader authoring tools  Particle Systems  Second part  Effect, texturing and particle system example Elias Holmlid2

3

 Rasterization  Taking vertex positions from the vertex shader and transforming them into pixels. Elias Holmlid4

 Transform and shading of geometry  Particles: motion + shading  Intermediate buffers (textures)  Post processing Elias Holmlid5

 Texture Elias Holmlid6

 Texture +  Directional light Elias Holmlid7

 Texture +  Directional light +  Spotlight Elias Holmlid8

 Texture +  Directional light +  Spotlight +  Normal map Elias Holmlid9

 Texture +  Directional light +  Spotlight +  Normal map +  Pointlight Elias Holmlid10

 Texture +  Directional light +  Spotlight +  Normal map +  Pointlight +  Shadows Elias Holmlid11

Elias Holmlid12  Example: Heat texture

Elias Holmlid13  Example: Soft shadows

Bloom disabledBloom enabled Elias Holmlid14

 C-like syntax  No object orientation  Functions can be used  By using include-files, functions and datatypes can be reused Elias Holmlid15

Elias Holmlid16

Elias Holmlid17

 Vertex shader  Used to transform vertices ▪ Solids deforming ▪ Skeletal animation ▪ Particle motion Elias Holmlid18

 Pixel shader  Manipulates pixel color and optionally the pixel depth.  Examples: ▪ Lighting ▪ Contrast ▪ Blur Elias Holmlid19

 Easy to work with in XNA  Represented by the class Effect  Effect effect;  effect.Load (”/effects/lightEffect”);  You can then set the attributes of the effect  effect.Parameters[”lightPosition”].SetValue()  To make the code more robust and efficient, implement a helper class for each effect.  After a while, you may want to find a faster way of adding new shaders Elias Holmlid20

 Complete IDE´s available for developing shaders Elias Holmlid21

 A way to simulate explosions, water, fire etc.  Particles behave in a similar, yet slightly different way Elias Holmlid22

 Particles created and killed on the CPU  Custom vertex declaration used  Pooling should be used (no memory allocation during runtime)  Current position/color/size of each particle calculated in vertex shader  Final color decided in pixel shader Elias Holmlid23