OpenGL Rendering Pipeline and Programmable Shaders
|
|
- Scot Peter White
- 5 years ago
- Views:
Transcription
1 h gpup Topics OpenGL Rendering Pipeline and Programmable s sh gpup Rendering Pipeline Types OpenGL Language Basics h gpup EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
2 h gpup 2 sh gpup 2 Pipeline: An organization or sotware and hardware which deines a ixed sequence o stages. Each stage carries out some operation, receiing its input data rom the prior stage and proiding its output data to the next stage. The order o data in the pipeline cannot change. Rendering Pipeline: An organization or the set o steps needed to conert a set o ertices into a rame buer image. The term rendering pipeline might be used generically or it might reer to something ery speciic. Clipping is the most tedious step in the rendering pipeline.. OpenGL Rendering Pipeline: The sequence o steps deined by OpenGL that start with a ertex and its attributes and usually result in the rame buer being written. Rendering Pass: The use o the rendering pipeline to render some set o primities. h gpup 2 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
3 h gpup 3 sh gpup 3 OpenGL Rendering Pipelines Deined by the OpenGL standard. Current is 4.5. h gpup 3 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
4 h gpup 4 sh gpup 4 Deinitions Stage: A pipeline section. Programmable Stage (or Unit): An OpenGL RP stage which can perorm its operation by executing user-proided sotware. Fixed-Function Stage (or Unit): An OpenGL RP stage which cannot be programmed, it s unctionality is speciied by the standard and proided by the implementation. : A program set up to run in a programmable stage, or the programmable stage itsel. h gpup 4 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 4
5 h gpup 5 sh gpup 5 Simpliied OpenGL Rendering Pipeline Programmable Unit Rendering Pipeline Input (From CPU or Buer Object) Vtx Vertex Vtx 2 3 Geometry >= Rasterizer >> Vertex Primitie () ment 0 or Frame Buer Update Fixed Function Unit Input Output ment h gpup 5 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 5
6 h gpup 6 Rendering Pass Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup 6 glbegin(gl_triangle_strip); glcolor3(lsu_spirit_gold); or ( int i=0; i<size; i++ ) ment 0 or Frame Buer Update glnormal3(norms[i].x,norms[i].y,norms[i].z); glvertex3(coords[i].x,coords[i].y,coords[i].z); } glend(); The execution o glbegin starts a rendering pass. Commands such as gldraw also start rendering passes. The rendering pass is complete ater glend inishes. During the rendering pass the CPU sends ertices into the start o the rendering pipeline which results in the rame buering being updated at the RP end. h gpup 6 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 6
7 h gpup 7 Vertex Inputs Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup 7 glbegin(gl_triangle_strip); glcolor3(lsu_spirit_gold); or ( int i=0; i<size; i++ ) ment 0 or Frame Buer Update glnormal3(norms[i].x,norms[i].y,norms[i].z); glvertex3(coords[i].x,coords[i].y,coords[i].z); } glend(); Each ertex in this example has the ollowing attributes: A coordinate (speciied by glvertex3). A normal (speciied by glnormal3). A color (speciied by glcolor3). Each execution o glvertex3 sends one ertex into the ertex shader. In the diagram a ertex, including all its attributes, shown as,, etc. h gpup 7 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 7
8 h gpup 8 The Vertex Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup 8 Input: One ertex. ment 0 or Frame Buer Update Output: One ertex. Historical Role: Compute lighted color o ertex. Conert object-space coordinates to clip space. Current Role: Proide data or geometry shader (completely user determined). I no geometry shader, output must include clip-space coordinates. h gpup 8 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 8
9 h gpup 9 The Geometry Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup 9 Input: One primitie. ment 0 or Frame Buer Update Output zero or more primities. Input primitie type must be compatible with primitie speciied by glbegin or gldraw. Input data is an array o ertex shader outputs the size o the array is determined by primitie type. Output primitie type can be reely chosen. Current Role: Must write clip-space coordinates to gl Position. Also writes whateer other data ragment shader needs. h gpup 9 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 9
10 gpup 0 Rasterizer Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup Input: One primitie (type determined by geometry shader). ment 0 or Frame Buer Update Output: Zero or more ragments one ragment or each pixel that the primitie coers. The data or each ragment is some combination o the data or each ertex in the input primitie. The rasterizer cannot be programmed. gpup 0 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
11 gpup ment Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup Input: One ragment. ment 0 or Frame Buer Update Output: Zero or one ragments. Typical Role: Read texels and blend with lighted color. gpup EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
12 gpup 2 Frame Buer Update Vtx Vertex Vtx Geometry >= 0 Rasterizer >> sh gpup Input one ragment. Output: None. ment 0 or Frame Buer Update Typical Role Applies depth, stencil, and other tests to ragment. Blends or writes passing ragment to color plane o rame buer. Frame buer update is not programmable. gpup 2 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
13 gpup 3 Data Access by s Input One set or each ertex. Vertex One set or all ertices. sh gpup Categories inputs and outputs. Uniorm ariables. Buer objects. Inputs and Outputs Vertex Normal Color MultiTexCoord0 my_s_input User-Deined Compatibility Proile-Deined Uniorm Vars glmodelviewmatrix, etc. Buer Object Position FrontColor TeXCoord[] my_s_out Data read and written by shader code. One set o data or each ertex, primitie, or ragment. To aoid waste, should not include alues common to all. For example, don t make color a shader input i all ertices are the same color, use a uniorm instead. gpup 3 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
14 gpup 4 Data Access by s Input One set or each ertex. Vertex One set or all ertices. sh gpup Uniorm Variables One set o data shared by all. Read only. Size is limited, typically 64 kib. Vertex Normal Color MultiTexCoord0 my_s_input User-Deined Compatibility Proile-Deined Usually cached (especially i < 8 kib accessed). Uniorm Vars glmodelviewmatrix, etc. Buer Object Position FrontColor TeXCoord[] my_s_out Data read and written by shader code. gpup 4 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
15 gpup 5 Data Access by s Input One set or each ertex. Vertex One set or all ertices. sh gpup Buer Objects Shared by all (ertices, primities, ragments). Can be read and written, typically as an array. Size is large. Vertex Normal Color MultiTexCoord0 my_s_input User-Deined Compatibility Proile-Deined Uniorm Vars glmodelviewmatrix, etc. Buer Object Position FrontColor TeXCoord[] my_s_out Data read and written by shader code. Usually not cached. gpup 5 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
16 gpup 6 OpenGL s sh gpup Vertex Processor ment Processor Vertex Normal Color MultiTexCoord0 Position FrontColor TeXCoord[] Color TeXCoord[] Color Depth gpup 6 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
17 gpup 7 Preparation Major Rendering Pipeline Steps sh gpup These actiities are perormed beore inoking pipeline. CPU speciies transorms, material properties, etc. Calling, say, gltranslate, helps set up pipeline but does not start it running or eed it data. Feed Data to Pipeline Data enters in a unit including a ertex and its attributes. This initiates the steps. gpup 7 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
18 gpup 8 sh gpup Vertex Processing Steps (By GPU or each ertex.) Apply modeliew transorm to ertex. Main result is ertex coordinate in eye space. Compute lighted color o ertex. Main result is lighted color. Apply projection transorm to eye-space ertex. Result is ertex coordinate in clip space. gpup 8 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
19 gpup 9 sh gpup Primitie Assembly Steps These steps operate on a primitie (a group o primities). Primitie Assembly (Group ertices into a primitie). Result is, say, a group o 3 describing a triangle. Clip (remoe) o-screen parts o primitie. Result is ewer and maybe dierent primities. Rasterize Result is the set o ragments (b locations) coered by primitie. gpup 9 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup
20 gpup 20 sh gpup 2 ment Processing Steps These steps operate on a ragment. Fetch texels, ilter and blend. Result is a rame-buer ready color. Frame Buer Update I ragment passes depth and other tests, write or blend. gpup 20 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
21 gpup 2 Programmable Units sh gpup 2 Programmable Unit: Part o the pipeline that can be programmed (as deined by some API). Choice o what is and isn t programmable constrained by: Need to allow or parallel (multithreaded, SIMD, MIMD) execution. Simple memory access. gpup 2 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
22 gpup 22 sh gpup 2 Major OpenGL Programmable Units Vertex Processor: Transorm ertex and texture coordinates, compute lighting. Geometry Processor: Using a transormed primitie and its neighbors generates new primities. For example, replace one triangle with many triangles to more closely match a cured surace. ment Processor: Using interpolated coordinates, read iltered texels and combine with colors. gpup 22 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
23 gpup 23 Languages sh gpup 2 : A programmable part o a GPU. The name shader is now misleading but is still in common use. Language: An language or programming shaders. gpup 23 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
24 gpup 24 High-Leel Languages sh gpup 2 High-Leel Languages OpenGL Language OpenGL standard. Syntax ery similar to C. Language designed or ertex and ragment shaders. Cg Originated with ATI, adopted in Direct3D. Syntax ery similar to C. Language designed or stream programs geometry, ertex, and ragment programs can be in stream orm. gpup 24 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
25 gpup 25 OpenGL Language (OGSL) sh gpup 2 OpenGL Language Important Features C-like CPP-like preprocessor directies. Library o useul geometry unctions. Includes ector and matrix types and operators. gpup 25 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
26 gpup 26 Example OGSL Data Types Example sh gpup 2 ec4 ertex_e = gl_modelviewmatrix * o_point; ec3 norm_e = gl_normalmatrix * gl_normal; ec4 light_pos = gl_lightsource[].position; loat phase_light = dot(norm_e, normalize(light_pos - ertex_e).xyz); loat phase_user = dot(norm_e, -ertex_e.xyz); loat phase = sign(phase_light) == sign(phase_user)? abs(phase_light) : 0.0; gpup 26 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
27 gpup 27 Storage Qualiiers OGSL Storage Qualiiers sh gpup 2 Used in a ariable declaration, speciies where data stored. Below, in, uniorm, constant, and out are storage qualiiers. in ec4 orce; uniorm loat x; const int sides = 5; out ec2 nudge; // Input to this shader, dierent or each primitie. // Input to shader, alue rarely changed. // Can neer be changed. // Output o this shader (input to some other). gpup 27 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
28 gpup 28 sh gpup 2 Storage Qualiier Types uniorm: Read-only by shader. Written by client, change is time consuming. Typical use: transormation matrices. in: Input to shader. Read-only by shader that made the in declaration. Value is set either by client (using glvertexattrib and riends) or by a prior stage shader (by writing an out ariable. Typical uses: ertex material properties (color), normal. out: Output o shader. Value is written by shader in which out declaration appears and read by shader in subsequent stage. sampler: Read-only by ertex and ragment shader. A handle to a texture unit, used by texture access unctions. gpup 28 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
29 gpup 29 sh gpup 2 Interpolation Qualiiers Used or ragment shader inputs. Speciy how alue should be interpolated. lat: No interpolation. smooth: Perspectie-correct interpolation. noperspectie: Linear interpolation. gpup 29 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 2
30 gpup 30 sh gpup 3 Deprecated Storage Qualiiers. These were used in earlier ersions o OGSL. They hae been replaced by in and out. attribute: Deprecated. Like an in but only can be used or ertex shader. arying: Deprecated. When used in a ertex shader is the same as out, when used in a ragment shader is the same as in. gpup 30 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
31 gpup 3 sh gpup 3 Storage Qualiier Example // For ertex and ragment shaders: uniorm ec3 graity_orce; uniorm loat gs_constant; uniorm ec2 ball_size; // Vertex Only in loat step_last_time; in ec4 position_let, position_right, position_aboe, position_below; in ec3 ball_speed; out ec4 out_position; out ec3 out_elocity; // ment Only // in ec4 out_position; in ec3 out_elocity; gpup 3 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
32 gpup 32 Function Parameters OGSL Functions sh gpup 3 OpenGL Shading Language.30 Section 4.4 Call by alue. Parameter Qualiiers: in (deault) out inout Built In Functions See OpenGL Shading Language.30 Section 8 gpup 32 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
33 gpup 33 OpenGL Shading Language Use sh gpup 3 Steps or adding a typical shader to existing OpenGL code: Deine what the shader is supposed to do. Identiy appropriate programmable units (ertex, geometry, ragment, etc). Identiy data that shaders will use. I data rom client (CPU) determine whether attribute or uniorm. For attributes and uniorms, determine i pre-deined or user-deined. Write shader code. In CPU code ollow steps or installing shader. (E.g., use p). Get names o any new uniorms and attributes. As necessary, initialize uniorms and attributes. Turn shader on and o as necessary. gpup 33 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
34 gpup 34 Example Phong sh gpup 3 Phong : A lighting model in which the lighted color is computed at each ragment. (Otherwise the lighted color is computed at each ertex o a primitie and those lighted colors are interpolated across the ragments.) Phong Steps Deine what shader does. Computes lighting at ragment using interpolated normal... Identiy appropriate units. For computing lighting: ragment shader. For passing along normal and color ino, ertex shader. Identiy data that shaders use. VS: Lighting data, normal. (All pre-deined.) FS: Normal (interpolated), eye-space ertex coordinates. User de. gpup 34 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
35 gpup 35 sh gpup 3 OpenGL Calls, rom Initialization to Use (See OGL 4.3 Chapter 7) Create Program Object (Once) pobject = glcreateprogram() For Each (Vertex, Geometry, ment, etc.): Create Object sobject = glcreate(gl VERTEX SHADER) Proide Source Code to Object and Compile glsource(sobject,,&shader text lines,null); glcompile(sobject); Attach glattach(pobject,sobject); Link (Once) gllinkprogram(pobject); Use (Many Times, e.g., once per rame.) gluseprogram(pobject); gpup 35 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
36 gpup 36 OGSL Use sh gpup 3 Obtaining and Using Variable Reerences At run time ariables identiied by number. At Initialization get location (index) o attributes and uniorms: sal pinnacle = glgetattriblocation(pobject,name); sun ball size = glgetuniormlocation(pobject,name); During Render (Inrequently) Change Uniorm Value (Using location) gluniorm2(sun ball size,ball size,ball size sq); During Render (Per Vertex Okay) Change Attribute Value (Using location) glvertexattrib4(sal pinnacle,pinnacle.x,pinnacle.y,pinnacle.z,radius); Done beore each glvertex. Same options as ertex, such as client and buer object arrays. gpup 36 EE Lecture Transparency. Formatted 8:06, 7 December 205 rom rendering-pipeline. sh gpup 3
OpenGL Rendering Pipeline and Programmable Shaders
h gpup Topics OpenGL Rendering Pipeline and Programmable s sh gpup Rendering Pipeline Types OpenGL Language Basics h gpup EE 4702- Lecture Transparency. Formatted 8:59, 29 September 206 rom rendering-pipeline.
More informationOpenGL Programmable Shaders
h gpup 1 Topics Rendering Pipeline Shader Types OpenGL Programmable Shaders sh gpup 1 OpenGL Shader Language Basics h gpup 1 EE 4702-X Lecture Transparency. Formatted 9:03, 20 October 2014 from shaders2.
More informationProgrammable GPUs Outline
papi 1 Outline References Programmable Units Languages Programmable GPUs Outline papi 1 OpenGL Shading Language papi 1 EE 7700-1 Lecture Transparency. Formatted 11:30, 25 March 2009 from set-prog-api.
More information12.2 Programmable Graphics Hardware
Fall 2018 CSCI 420: Computer Graphics 12.2 Programmable Graphics Hardware Kyle Morgenroth http://cs420.hao-li.com 1 Introduction Recent major advance in real time graphics is the programmable pipeline:
More informationProgramming shaders & GPUs Christian Miller CS Fall 2011
Programming shaders & GPUs Christian Miller CS 354 - Fall 2011 Fixed-function vs. programmable Up until 2001, graphics cards implemented the whole pipeline for you Fixed functionality but configurable
More informationProgrammable Graphics Hardware
CSCI 480 Computer Graphics Lecture 14 Programmable Graphics Hardware [Ch. 9] March 2, 2011 Jernej Barbic University of Southern California OpenGL Extensions Shading Languages Vertex Program Fragment Program
More informationSupplement to Lecture 22
Supplement to Lecture 22 Programmable GPUs Programmable Pipelines Introduce programmable pipelines - Vertex shaders - Fragment shaders Introduce shading languages - Needed to describe shaders - RenderMan
More informationIntroduction 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 informationProgrammable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1
Programmable GPUs Real Time Graphics Virtua Fighter 1995 (SEGA Corporation) NV1 Dead or Alive 3 2001 (Tecmo Corporation) Xbox (NV2A) Nalu 2004 (NVIDIA Corporation) GeForce 6 Human Head 2006 (NVIDIA Corporation)
More informationX. 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 informationThe Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!
! The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 4! stanford.edu/class/ee267/! Updates! for 24h lab access:
More informationCould 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 informationThe Transition from RenderMan to the OpenGL Shading Language (GLSL)
1 The Transition from RenderMan to the OpenGL Shading Language (GLSL) Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International
More informationToday. Rendering - III. Outline. Texturing: The 10,000m View. Texture Coordinates. Specifying Texture Coordinates in GL
Today Rendering - III CS148, Summer 2010 Graphics Pipeline and Programmable Shaders Artist Workflow Siddhartha Chaudhuri 1 2 Outline Texturing: The 10,000m View Intro to textures The fixed-function graphics
More informationProgrammable Graphics Hardware
Programmable Graphics Hardware Outline 2/ 49 A brief Introduction into Programmable Graphics Hardware Hardware Graphics Pipeline Shading Languages Tools GPGPU Resources Hardware Graphics Pipeline 3/ 49
More informationSHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming
SHADER PROGRAMMING Based on Jian Huang s lecture on Shader Programming What OpenGL 15 years ago could do http://www.neilturner.me.uk/shots/opengl-big.jpg What OpenGL can do now What s Changed? 15 years
More informationShader Programs. Lecture 30 Subsections 2.8.2, Robb T. Koether. Hampden-Sydney College. Wed, Nov 16, 2011
Shader Programs Lecture 30 Subsections 2.8.2, 2.8.3 Robb T. Koether Hampden-Sydney College Wed, Nov 16, 2011 Robb T. Koether (Hampden-Sydney College) Shader Programs Wed, Nov 16, 2011 1 / 43 Outline 1
More informationReal-Time Rendering (Echtzeitgraphik) Michael Wimmer
Real-Time Rendering (Echtzeitgraphik) Michael Wimmer wimmer@cg.tuwien.ac.at Walking down the graphics pipeline Application Geometry Rasterizer What for? Understanding the rendering pipeline is the key
More informationGraphics 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 informationReal - 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 informationInformation Coding / Computer Graphics, ISY, LiTH GLSL. OpenGL Shading Language. Language with syntax similar to C
GLSL OpenGL Shading Language Language with syntax similar to C Syntax somewhere between C och C++ No classes. Straight ans simple code. Remarkably understandable and obvious! Avoids most of the bad things
More informationPipeline 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 informationCS770/870 Spring 2017 Open GL Shader Language GLSL
Preview CS770/870 Spring 2017 Open GL Shader Language GLSL Review traditional graphics pipeline CPU/GPU mixed pipeline issues Shaders GLSL graphics pipeline Based on material from Angel and Shreiner, Interactive
More informationCS770/870 Spring 2017 Open GL Shader Language GLSL
CS770/870 Spring 2017 Open GL Shader Language GLSL Based on material from Angel and Shreiner, Interactive Computer Graphics, 6 th Edition, Addison-Wesley, 2011 Bailey and Cunningham, Graphics Shaders 2
More informationLecture 2. Shaders, GLSL and GPGPU
Lecture 2 Shaders, GLSL and GPGPU Is it interesting to do GPU computing with graphics APIs today? Lecture overview Why care about shaders for computing? Shaders for graphics GLSL Computing with shaders
More informationGLSL 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 informationGPU Programming EE Final Examination
Name GPU Programming EE 4702-1 Final Examination Tuesday, 5 December 2017 12:30 14:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Exam Total (15 pts) (20 pts) (30 pts) (35 pts) (100 pts) Good Luck!
More informationPipeline Operations. CS 4620 Lecture 14
Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives
More informationGPU Programming EE Final Examination
Name GPU Programming EE 4702-1 Final Examination Tuesday, 9 December 2014 7:30 9:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Exam Total (20 pts) (15 pts) (20 pts) (20 pts) (25 pts) (100
More informationGPU Programming EE Midterm Examination
Name GPU Programming EE 4702- Midterm Examination Wednesday, 2 November 204 9:30 0:20 CST Alias Problem Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (8 pts) (2 pts) (24 pts) (2 pts) (4
More informationThe 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 informationIntroduction to Shaders for Visualization. The Basic Computer Graphics Pipeline
Introduction to Shaders for Visualization Mike Bailey The Basic Computer Graphics Pipeline Model Transform View Transform Per-vertex Lighting Projection Transform Homogeneous Division Viewport Transform
More informationGraphics Processing Unit Architecture (GPU Arch)
Graphics Processing Unit Architecture (GPU Arch) With a focus on NVIDIA GeForce 6800 GPU 1 What is a GPU From Wikipedia : A specialized processor efficient at manipulating and displaying computer graphics
More informationTutorial 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 informationSome advantages come from the limited environment! No classes. Stranight ans simple code. Remarkably. Avoids most of the bad things with C/C++.
GLSL OpenGL Shading Language Language with syntax similar to C Syntax somewhere between C och C++ No classes. Stranight ans simple code. Remarkably understandable and obvious! Avoids most of the bad things
More informationCopyright Khronos Group, Page Graphic Remedy. All Rights Reserved
Avi Shapira Graphic Remedy Copyright Khronos Group, 2009 - Page 1 2004 2009 Graphic Remedy. All Rights Reserved Debugging and profiling 3D applications are both hard and time consuming tasks Companies
More informationToday s Agenda. Basic design of a graphics system. Introduction to OpenGL
Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic
More informationGPU Programming EE Midterm Examination
Name Solution GPU Programming EE 4702- Midterm Examination Wednesday, 2 November 204 9:30 0:20 CST Alias Phylæ has landed! Problem Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (8 pts) (2
More informationCS 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 informationCSE4030 Introduction to Computer Graphics
CSE4030 Introduction to Computer Graphics Dongguk University Jeong-Mo Hong Timetable 00:00~00:10 Introduction (English) 00:10~00:50 Topic 1 (English) 00:50~00:60 Q&A (English, Korean) 01:00~01:40 Topic
More information2.11 Particle Systems
2.11 Particle Systems 320491: Advanced Graphics - Chapter 2 152 Particle Systems Lagrangian method not mesh-based set of particles to model time-dependent phenomena such as snow fire smoke 320491: Advanced
More informationCS 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 informationCS 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 informationGraphics 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 informationSign up for crits! Announcments
Sign up for crits! Announcments Reading for Next Week FvD 16.1-16.3 local lighting models GL 5 lighting GL 9 (skim) texture mapping Modern Game Techniques CS248 Lecture Nov 13 Andrew Adams Overview The
More informationProgramming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Programming with OpenGL Shaders I Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Objectives Shader Programming Basics Simple Shaders Vertex shader Fragment shaders
More informationGPU Programming EE Final Examination
Name GPU Programming EE 4702-1 Final Examination Monday, 5 December 2016 17:30 19:30 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Exam Total (20 pts) (20 pts) (15 pts) (20 pts) (25 pts)
More informationDrawing Fast The Graphics Pipeline
Drawing Fast The Graphics Pipeline CS559 Fall 2015 Lecture 9 October 1, 2015 What I was going to say last time How are the ideas we ve learned about implemented in hardware so they are fast. Important:
More informationCS451Real-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 informationModels and Architectures
Models and Architectures Objectives Learn the basic design of a graphics system Introduce graphics pipeline architecture Examine software components for an interactive graphics system 1 Image Formation
More informationSpring 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 informationGPU Programming EE Final Examination
Name Solution GPU Programming EE 4702-1 Final Examination Friday, 11 December 2015 15:00 17:00 CST Alias Methane? Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (20 pts) (15 pts)
More informationCS 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 informationReminder: Affine Transformations. Viewing and Projection. Shear Transformations. Transformation Matrices in OpenGL. Specification via Ratios
CSCI 420 Computer Graphics Lecture 6 Viewing and Projection Jernej Barbic University o Southern Caliornia Shear Transormation Camera Positioning Simple Parallel Projections Simple Perspective Projections
More informationShaders. Introduction. OpenGL Grows via Extensions. OpenGL Extensions. OpenGL 2.0 Added Shaders. Shaders Enable Many New Effects
CSCI 420 Computer Graphics Lecture 4 Shaders Jernej Barbic University of Southern California Shading Languages GLSL Vertex Array Objects Vertex Shader Fragment Shader [Angel Ch. 1, 2, A] Introduction The
More informationNext-Generation Graphics on Larrabee. Tim Foley Intel Corp
Next-Generation Graphics on Larrabee Tim Foley Intel Corp Motivation The killer app for GPGPU is graphics We ve seen Abstract models for parallel programming How those models map efficiently to Larrabee
More informationCornell University CS 569: Interactive Computer Graphics. Introduction. Lecture 1. [John C. Stone, UIUC] NASA. University of Calgary
Cornell University CS 569: Interactive Computer Graphics Introduction Lecture 1 [John C. Stone, UIUC] 2008 Steve Marschner 1 2008 Steve Marschner 2 NASA University of Calgary 2008 Steve Marschner 3 2008
More information10. SOPC Builder Component Development Walkthrough
10. SOPC Builder Component Development Walkthrough QII54007-9.0.0 Introduction This chapter describes the parts o a custom SOPC Builder component and guides you through the process o creating an example
More informationGrafica Computazionale: Lezione 30. Grafica Computazionale. Hiding complexity... ;) Introduction to OpenGL. lezione30 Introduction to OpenGL
Grafica Computazionale: Lezione 30 Grafica Computazionale lezione30 Introduction to OpenGL Informatica e Automazione, "Roma Tre" May 20, 2010 OpenGL Shading Language Introduction to OpenGL OpenGL (Open
More informationThe Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)!
! The Graphics Pipeline and OpenGL III: OpenGL Shading Language (GLSL 1.10)! Gordon Wetzstein! Stanford University! EE 267 Virtual Reality! Lecture 4! stanford.edu/class/ee267/! Lecture Overview! Review
More informationIntroduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science Laboratory University of New Mexico Models and Architectures
More informationPROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.
PROFESSIONAL WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB Andreas Anyuru WILEY John Wiley & Sons, Ltd. INTRODUCTION xxl CHAPTER 1: INTRODUCING WEBGL 1 The Basics of WebGL 1 So Why Is WebGL So Great?
More informationEE 4702 GPU Programming
fr 1 Final Exam Review When / Where EE 4702 GPU Programming fr 1 Tuesday, 4 December 2018, 12:30-14:30 (12:30 PM - 2:30 PM) CST Room 226 Tureaud Hall (Here) Conditions Closed Book, Closed Notes Bring one
More informationShaders (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 informationLecture 13: OpenGL Shading Language (GLSL)
Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 18, 2018 1/56 Motivation } Last week, we discussed the many of the new tricks in Graphics require low-level access to the Graphics
More informationShaders CSCI 4229/5229 Computer Graphics Fall 2017
Shaders CSCI 4229/5229 Computer Graphics Fall 2017 What is a Shader? A shader is a computer program that runs on the GPU to calculate the properties of vertexes, pixels and other graphical processing Examples:
More informationGLSL 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 informationGPU Programming EE Final Examination
Name GPU Programming EE 4702-1 Final Examination Friday, 11 December 2015 15:00 17:00 CST Alias Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Exam Total (20 pts) (15 pts) (15 pts) (20 pts)
More informationIntroduction to the OpenGL Shading Language (GLSL)
1 Introduction to the OpenGL Shading Language (GLSL) This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Mike Bailey mjb@cs.oregonstate.edu
More informationGPU Memory Model. Adapted from:
GPU Memory Model Adapted from: Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary J. Katz, University
More informationGraphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1
Graphics Hardware Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/26/07 1 From last time Texture coordinates Uses of texture maps reflectance and other surface parameters lighting
More informationCS770/870 Fall 2015 Advanced GLSL
Expanded Graphics Pipeline CS770/870 Fall 2015 Advanced GLSL Geometry definition Shaders can actually be inserted in more places in pipeline Vertex and fragment shaders are most important Vertex shader
More informationRasterization Overview
Rendering Overview The process of generating an image given a virtual camera objects light sources Various techniques rasterization (topic of this course) raytracing (topic of the course Advanced Computer
More informationSpring 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 informationGeneral Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing)
ME 290-R: General Purpose Computation (CAD/CAM/CAE) on the GPU (a.k.a. Topics in Manufacturing) Sara McMains Spring 2009 Performance: Bottlenecks Sources of bottlenecks CPU Transfer Processing Rasterizer
More informationC P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev
C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE UGRAD.CS.UBC.C A/~CS314 Mikhail Bessmeltsev 1 WHAT IS RENDERING? Generating image from a 3D scene 2 WHAT IS RENDERING? Generating image
More informationOpenGL refresher. Advanced Computer Graphics 2012
Advanced Computer Graphics 2012 What you will see today Outline General OpenGL introduction Setting up: GLUT and GLEW Elementary rendering Transformations in OpenGL Texture mapping Programmable shading
More informationGraphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal
Graphics Hardware, Graphics APIs, and Computation on GPUs Mark Segal Overview Graphics Pipeline Graphics Hardware Graphics APIs ATI s low-level interface for computation on GPUs 2 Graphics Hardware High
More informationSung-Eui Yoon ( 윤성의 )
Introduction to Computer Graphics and OpenGL Graphics Hardware Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/etri_cg/ Class Objectives Understand how GPUs have been evolved Understand
More informationRendering 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 informationProgramming with OpenGL Shaders I. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico
Programming with OpenGL Shaders I Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico 0 Objectives Shader Basics Simple Shaders Vertex shader Fragment shaders 1 Vertex
More informationProgrammable Graphics Hardware
Programmable Graphics Hardware Johan S. Seland Center of Mathematics for Applications University of Oslo INF3320 22. November 2006 Programmable Graphics Hardware Programmable Graphics Hardware = GPU (Graphical
More informationShaders CSCI 4239/5239 Advanced Computer Graphics Spring 2014
Shaders CSCI 4239/5239 Advanced Computer Graphics Spring 2014 What is a Shader? Wikipedia: A shader is a computer program used in 3D computer graphics to determine the final surface properties of an object
More informationThe Basic Computer Graphics Pipeline, OpenGL-style. Introduction to the OpenGL Shading Language (GLSL)
Introduction to the OpenGL Shading Language (GLSL) 1 The Basic Pipeline, OpenGL-style Vertex, Normal, Color ModelViewMatrix, ProjectionMatrix, ModelViewProjectionMatrix 2 MC Model WC View Per-vertex Projection
More informationIntroduction to the OpenGL Shading Language
Introduction to the OpenGL Shading Language Randi Rost Director of Developer Relations, 3Dlabs 08-Dec-2005 1 Why use graphics programmability? Graphics hardware has changed radically Fixed functionality
More informationOpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL
OpenGL: Open Graphics Library Introduction to OpenGL Part II CS 351-50 Graphics API ( Application Programming Interface) Software library Layer between programmer and graphics hardware (and other software
More informationDrawing Fast The Graphics Pipeline
Drawing Fast The Graphics Pipeline CS559 Fall 2016 Lectures 10 & 11 October 10th & 12th, 2016 1. Put a 3D primitive in the World Modeling 2. Figure out what color it should be 3. Position relative to the
More informationShadow Casting with Stencil Buffer for Real-Time Rendering
102 The International Arab Journal o Inormation Technology, Vol. 5, No. 4, October Shadow Casting with Stencil Buer or Real-Time Rendering Lee Weng, Daut Daman, and Mohd Rahim Faculty o Computer Science
More informationOptimizing DirectX Graphics. Richard Huddy European Developer Relations Manager
Optimizing DirectX Graphics Richard Huddy European Developer Relations Manager Some early observations Bear in mind that graphics performance problems are both commoner and rarer than you d think The most
More informationDrawing Fast The Graphics Pipeline
Drawing Fast The Graphics Pipeline CS559 Spring 2016 Lecture 10 February 25, 2016 1. Put a 3D primitive in the World Modeling Get triangles 2. Figure out what color it should be Do ligh/ng 3. Position
More informationCS 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 informationTo Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)
Computer Graphics (Fall 2008) COMS 4160, Lecture 9: OpenGL 1 http://www.cs.columbia.edu/~cs4160 To Do Start thinking (now) about HW 3. Milestones are due soon. Course Course 3D Graphics Pipeline 3D Graphics
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry The OpenGL pipeline Christopher Dyken and Martin Reimers 07.10.2009 Page 1 The OpenGL pipeline Real Time Rendering: The Graphics Processing Unit (GPU) (Chapter
More informationCMPS160 Shader-based OpenGL Programming. All slides originally from Prabath Gunawardane, et al. unless noted otherwise
CMPS160 Shader-based OpenGL Programming All slides originally from Prabath Gunawardane, et al. unless noted otherwise Shader gallery I Above: Demo of Microsoft s XNA game platform Right: Product demos
More informationShader 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 informationShaders. Slide credit to Prof. Zwicker
Shaders Slide credit to Prof. Zwicker 2 Today Shader programming 3 Complete model Blinn model with several light sources i diffuse specular ambient How is this implemented on the graphics processor (GPU)?
More informationCS 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 informationModule 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 informationAn Efficient Mesh Simplification Method with Feature Detection for Unstructured Meshes and Web Graphics
An Eicient Mesh Simpliication Method with Feature Detection or Unstructured Meshes and Web Graphics Bing-Yu Chen National Taiwan Uniersity robin@im.ntu.edu.tw Tomoyuki Nishita The Uniersity o Tokyo nis@is.s.u-tokyo.ac.jp
More informationWebGL 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