# GPU Programming EE Final Examination

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Name GPU Programming EE Final Examination Monday, 5 December :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) (100 pts) Good Luck!

3 Problem 2: [20 pts] Appearing below is a typical vertex shader. in vec2 gl_multitexcoord0; // Declare size. void vs_main() { gl_position = gl_modelviewprojectionmatrix * gl_vertex; vertex_e = gl_modelviewmatrix * gl_vertex; normal_e = normalize(gl_normalmatrix * gl_normal); gl_texcoord[0] = gl_multitexcoord0; color = gl_color; (a) Suppose that the shader above was used in a rendering pass of v vertices. No buffer objects were used and all shader inputs were sourced from client arrays. Compute the amount of data sent from the CPU to the GPU for the rendering pass. CPU to GPU data for a rendering pass of v vertices counting shader inputs is: CPU to GPU data for a rendering pass of v vertices counting uniform variables is: 3

4 Problem 2, continued: The vertex shader below is used for an instanced draw of spheres. The vertex shader inputs are sourced from buffer objects and other buffer objects are accessed directly using the instance ID. layout ( binding = 1 ) buffer sr { mat4 sphere_transform[]; ; layout ( binding = 3 ) buffer sc { vec4 sphere_color[]; ; void vs_main_instances_sphere() { mat4 transform = sphere_transform[gl_instanceid]; vec3 ctr = transform[3].xyz; // Extract coordinate of sphere center. float radius = transform[3][3]; // Extract sphere radius. mat3 rot = mat3(transform); // Extract rotation matrix. vec3 normal_o = rot * gl_vertex.xyz; vec4 vertex_o = vec4( ctr + radius * normal_o, 1 ); color = sphere_color[gl_instanceid]; gl_position = gl_modelviewprojectionmatrix * vertex_o; vertex_e = gl_modelviewmatrix * vertex_o; normal_e = normalize(gl_normalmatrix * normal_o ); gl_texcoord[0] = gl_multitexcoord0; (b) In the code above label the vertex shader inputs and uniform variables. Label vertex shader inputs with a I and uniform variables with a U. (c) Compute the amount of data sent from the CPU to the GPU for an instanced draw rendering pass in which n instances (spheres) are rendered, each consisting of v vertices. Assume that initially all buffer objects are on the CPU. Note that mat4 is a 4 4 matrix of floats. Amount of CPU to GPU data for n instances of v vertices, accounting for uniforms, buffer objects, and anything else that really needs to be moved. 4

5 Problem 3: [15 pts] Consider our well written CUDA example (slightly simplified): global void kmain_efficient() { const int tid = threadidx.x + blockidx.x * blockdim.x; const int n_threads = blockdim.x * griddim.x; // Note: There s no need to understand this code. Just remember // that each thread does about the same amount of work. for ( int h=tid; h<d_app.array_size; h += n_threads ) { float4 p = d_app.d_in[h]; d_app.d_out[h] = dot(p,p); Let n denote the value of array_size, and let S denote the number of streaming multiprocessors(abbreviated SMs and sometimes MPs). Assume that n is large so that there s plenty of work to do for each thread. (a) Determine a launch configuration in terms of n and S that uses the minimum number of blocks needed to maximize warp (or thread) occupancy on the SMs. Do this for a device with a block size limit of 1024 threads, an SM limit of 2048 threads, and an SM limit of 16 blocks. Hint: There s no need to use both n and S. Use B for the block size and G for the number of blocks (grid size). Block size B = Grid size (number of blocks) G = (b) Let B and G be a solution to the problem above (meaning a good choice for B and G for S SMs) and let t o be the execution time in a kernel launch of that configuration. Estimate the execution time for the configurations below. Hint: Remember that G was chosen to maximize the number of warps per SM. Estimate the execution time for a launch of G blocks of size B 1. Estimate the execution time for a launch of G 1 blocks of size B. Estimate the execution time for a launch of G+1 blocks of size B. 5

6 Problem 4: [20 pts] Consider the CUDA kernel below. Let n denote the value of array_size, B the block size, and G the number of blocks. global void prob_x(float2 *d_in, float *d_out) { const int tid = threadidx.x + blockidx.x * blockdim.x; const int n_threads = blockdim.x * griddim.x; for ( int h=tid; h<d_app.array_size-1; h += n_threads ) { float2 p = d_in[h]; float2 q = d_in[h+1]; d_out[h] = dot(p,q); (a) Compute how much data is read from global memory during the execution of the kernel. Note that each element d_in[i] is accessed by two threads. Amount of data read: (b) The kernel below includes a declaration for shared memory intended to fix the inefficiency in the kernel above. Complete the kernel. Use shared memory to avoid waste. global void prob_x2(float2 *d_in, float *d_out) { const int tid = threadidx.x + blockidx.x * blockdim.x; const int n_threads = blockdim.x * griddim.x; shared float2 sm[1025]; for ( int h=tid; h<d_app.array_size; h += n_threads ) { float2 p = d_in[h]; float2 q = d_out[h] = dot(p,q); 6

7 Problem 5: [25 pts] Answer each question below. (a) Show a diagram illustrating the relationship between vertices and primitives in a triangle strip. Number both the vertices and the triangles in the correct order. Show at least three triangles. Diagram with number vertices and triangles illustrating a triangle strip. (b) Describe what is tested in the stencil test and what the stencil test might be used for. A stencil test checks: Typical use for a stencil test: 7

8 (c) Interpolation qualifiers, flat, noperspective, and smooth, are used for the inputs of which rendering pipeline stage? What do they do? They appear at the input to: They affect the qualified variable by: (d) Between which coordinate spaces does the OpenGL projection matrix transform. The projection matrix transforms coordinates from to (e) What is the difference between a material property (including attributes emitted with glcolor3f) and a lighted color? Difference between material property and lighted color? 8

### GPU 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)

### GPU 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)

### Today. 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

### 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:

### The 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:

### Supplement 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

### Best practices for effective OpenGL programming. Dan Omachi OpenGL Development Engineer

Best practices for effective OpenGL programming Dan Omachi OpenGL Development Engineer 2 What Is OpenGL? 3 OpenGL is a software interface to graphics hardware - OpenGL Specification 4 GPU accelerates rendering

### ECE 408 / CS 483 Final Exam, Fall 2014

ECE 408 / CS 483 Final Exam, Fall 2014 Thursday 18 December 2014 8:00 to 11:00 Central Standard Time You may use any notes, books, papers, or other reference materials. In the interest of fair access across

### Shaders. 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)?

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

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

CSE 167: Introduction to Computer Graphics Lecture #13: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 6 due Friday Next Thursday: Midterm #2

### The Projection Matrix

The Projection Matrix Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Aug 30, 2017 Robb T. Koether (Hampden-Sydney College) The Projection Matrix Wed, Aug 30, 2017 1 / 21 Outline 1 The World Coordinate

### Levy: Constraint Texture Mapping, SIGGRAPH, CS 148, Summer 2012 Introduction to Computer Graphics and Imaging Justin Solomon

Levy: Constraint Texture Mapping, SIGGRAPH, 2001 CS 148, Summer 2012 Introduction to Computer Graphics and Imaging Justin Solomon Instructor: Justin Solomon Email: justin.solomon@stanford.edu Office: Clark

### High Performance Linear Algebra on Data Parallel Co-Processors I

926535897932384626433832795028841971693993754918980183 592653589793238462643383279502884197169399375491898018 415926535897932384626433832795028841971693993754918980 592653589793238462643383279502884197169399375491898018

1 Tessellation Shaders Mike Bailey mjb@cs.oregonstate.edu tessellation.pptx Why do we need a Tessellation step right in the pipeline? You can perform adaptive subdivision based on a variety of criteria

### GLSL v1.20. Scott MacHaffie Schrödinger, Inc.

1 GLSL v1.20 Scott MacHaffie Schrödinger, Inc. http://www.schrodinger.com Table of Contents Introduction...2 Example 01: Trivial shader...2 Syntax...3 Types of variables...3 Example 02: Materials vertex

### Technical Game Development II. Reference: Rost, OpenGL Shading Language, 2nd Ed., AW, 2006 The Orange Book Also take CS 4731 Computer Graphics

Shader Programming Technical Game Development II Professor Charles Rich Computer Science Department rich@wpi.edu Reference: Rost, OpenGL Shading Language, 2nd Ed., AW, 2006 The Orange Book Also take CS

### CUDA OPTIMIZATION TIPS, TRICKS AND TECHNIQUES. Stephen Jones, GTC 2017

CUDA OPTIMIZATION TIPS, TRICKS AND TECHNIQUES Stephen Jones, GTC 2017 The art of doing more with less 2 Performance RULE #1: DON T TRY TOO HARD Peak Performance Time 3 Unrealistic Effort/Reward Performance

### Real-time Graphics 9. GPGPU

9. GPGPU GPGPU GPU (Graphics Processing Unit) Flexible and powerful processor Programmability, precision, power Parallel processing CPU Increasing number of cores Parallel processing GPGPU general-purpose

### Lecture 09: Shaders (Part 1)

Lecture 09: Shaders (Part 1) CSE 40166 Computer Graphics Peter Bui University of Notre Dame, IN, USA November 9, 2010 OpenGL Rendering Pipeline OpenGL Rendering Pipeline (Pseudo-Code) 1 f o r gl_vertex

### Copyright Khronos Group 2012 Page 1. Teaching GL. Dave Shreiner Director, Graphics and GPU Computing, ARM 1 December 2012

Copyright Khronos Group 2012 Page 1 Teaching GL Dave Shreiner Director, Graphics and GPU Computing, ARM 1 December 2012 Copyright Khronos Group 2012 Page 2 Agenda Overview of OpenGL family of APIs Comparison

### 2D graphics with WebGL

2D graphics with WebGL Some material contained here is adapted from the book s slides. September 7, 2015 (Dr. Mihail) 2D graphics September 7, 2015 1 / 22 Graphics Pipeline (Dr. Mihail) 2D graphics September

### The Projection Matrix

The Projection Matrix Lecture 8 Robb T. Koether Hampden-Sydney College Fri, Sep 11, 2015 Robb T. Koether (Hampden-Sydney College) The Projection Matrix Fri, Sep 11, 2015 1 / 43 Outline 1 Coordinate Systems

### C 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

### Optimizing CUDA for GPU Architecture. CSInParallel Project

Optimizing CUDA for GPU Architecture CSInParallel Project August 13, 2014 CONTENTS 1 CUDA Architecture 2 1.1 Physical Architecture........................................... 2 1.2 Virtual Architecture...........................................

### OPENGL RENDERING PIPELINE

CPSC 314 03 SHADERS, OPENGL, & JS UGRAD.CS.UBC.CA/~CS314 Textbook: Appendix A* (helpful, but different version of OpenGL) Alla Sheffer Sep 2016 OPENGL RENDERING PIPELINE 1 OPENGL RENDERING PIPELINE Javascript

### 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

### OpenGL Performances and Flexibility. Visual Computing Laboratory ISTI CNR, Italy

OpenGL Performances and Flexibility Visual Computing Laboratory ISTI CNR, Italy The Abstract Graphics Pipeline Application 1. The application specifies vertices & connectivity. Vertex Processing 2. The

### COURSE 17: STATE-OF-THE-ART IN SHADING HARDWARE1 CHAPTER 6: THE OPENGL SHADING LANGUAGE 2. Randi J. Rost 3Dlabs, Inc.

COURSE 17: STATE-OF-THE-ART IN SHADING HARDWARE1 CHAPTER 6: THE OPENGL SHADING LANGUAGE 2 Randi J. Rost 3Dlabs, Inc. SIGGRAPH 2002 Course Notes 05-August-2002 SIGGRAPH 2002 6-1 State of the Art in Shading

### Introduction 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

### Mobile Application Programing: Android. OpenGL Operation

Mobile Application Programing: Android OpenGL Operation Activities Apps are composed of activities Activities are self-contained tasks made up of one screen-full of information Activities start one another

### Parallel Computer Architecture and Programming Written Assignment 2

Parallel Computer Architecture and Programming Written Assignment 2 40 points total + 6 pts extra credit. Due Monday, July 10 at the start of class. Problem 3: Running a CUDA Program on a GPU (12 pts)

### CS4621/5621 Fall Computer Graphics Practicum Intro to OpenGL/GLSL

CS4621/5621 Fall 2015 Computer Graphics Practicum Intro to OpenGL/GLSL Professor: Kavita Bala Instructor: Nicolas Savva with slides from Balazs Kovacs, Eston Schweickart, Daniel Schroeder, Jiang Huang

### CMSC427 Fall 2017 OpenGL Notes A: Starting with JOGL and OpenGL Objectives of notes Readings Computer Graphics Programming in OpenGL with Java

CMSC427 Fall 2017 OpenGL Notes A: Starting with JOGL and OpenGL Objectives of notes Show how to program full OpenGL in JOGL Start on shader programing Readings Computer Graphics Programming in OpenGL with

### Module 3: CUDA Execution Model -I. Objective

ECE 8823A GPU Architectures odule 3: CUDA Execution odel -I 1 Objective A more detailed look at kernel execution Data to thread assignment To understand the organization and scheduling of threads Resource

### 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

### Introduction to Parallel Programming

Introduction to Parallel Programming Pablo Brubeck Department of Physics Tecnologico de Monterrey October 14, 2016 Student Chapter Tecnológico de Monterrey Tecnológico de Monterrey Student Chapter Outline

### Programming of Graphics

Peter Mileff PhD Programming of Graphics Introduction to OpenGL University of Miskolc Department of Information Technology OpenGL libraries GL (Graphics Library): Library of 2D, 3D drawing primitives and

### Drawing 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

### CMSC427 OpenGL and JOGL

CMSC427 OpenGL and JOGL Step 1: Configuring and compiling In Eclipse following previous instructions Get from web page CMSC427OpenGLCode.zip Add graphics3dlib.jar to JOGL project From command line Add

### Lecture 8: GPU Programming. CSE599G1: Spring 2017

Lecture 8: GPU Programming CSE599G1: Spring 2017 Announcements Project proposal due on Thursday (4/28) 5pm. Assignment 2 will be out today, due in two weeks. Implement GPU kernels and use cublas library

### CS452/552; EE465/505. Models & Viewing

CS452/552; EE465/505 Models & Viewing 2-03 15 Outline! Building Polygonal Models Vertex lists; gl.drawarrays( ) Edge lists: gl.drawelements( )! Viewing Classical Viewing Read: Viewing in Web3D Angel, Section

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

### Multi-Processors and GPU

Multi-Processors and GPU Philipp Koehn 7 December 2016 Predicted CPU Clock Speed 1 Clock speed 1971: 740 khz, 2016: 28.7 GHz Source: Horowitz "The Singularity is Near" (2005) Actual CPU Clock Speed 2 Clock

### Scanline Rendering 2 1/42

Scanline Rendering 2 1/42 Review 1. Set up a Camera the viewing frustum has near and far clipping planes 2. Create some Geometry made out of triangles 3. Place the geometry in the scene using Transforms

Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics

### Computergraphics Exercise 15/ Shading & Texturing

Computergraphics Exercise 15/16 3. Shading & Texturing Jakob Wagner for internal use only Shaders Vertex Specification define vertex format & data in model space Vertex Processing transform to clip space

### CENG 477 Introduction to Computer Graphics. Graphics Hardware and OpenGL

CENG 477 Introduction to Computer Graphics Graphics Hardware and OpenGL Introduction Until now, we focused on graphic algorithms rather than hardware and implementation details But graphics, without using

### The Rendering Pipeline (1)

The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination

### CMPS160 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

### Unrolling parallel loops

Unrolling parallel loops Vasily Volkov UC Berkeley November 14, 2011 1 Today Very simple optimization technique Closely resembles loop unrolling Widely used in high performance codes 2 Mapping to GPU:

### Artistic Rendering with Graphics Shaders

Artistic Rendering with Graphics Shaders by A Master Research Paper submitted to the Eastern Michigan University, Department of Computer Science In Partial Fulfillment of the Requirements for the Master

### Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary

### Mobile Application Programming: Android. OpenGL Operation

Mobile Application Programming: Android OpenGL Operation OpenGL ES C-Based Performance-Oriented Graphics Library Wrapper libraries provided for Java, C#, etc. Produces 2D images from 2D or 3D geometric

### The Graphics Pipeline

The Graphics Pipeline Lecture 2 Robb T. Koether Hampden-Sydney College Fri, Aug 28, 2015 Robb T. Koether (Hampden-Sydney College) The Graphics Pipeline Fri, Aug 28, 2015 1 / 19 Outline 1 Vertices 2 The

### Lecture 1: an introduction to CUDA

Lecture 1: an introduction to CUDA Mike Giles mike.giles@maths.ox.ac.uk Oxford University Mathematical Institute Oxford e-research Centre Lecture 1 p. 1 Overview hardware view software view CUDA programming

### Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Building Models CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce simple data structures for building polygonal models - Vertex lists - Edge

### GLSL Overview: Creating a Program

1. Create the OpenGL application GLSL Overview: Creating a Program Primarily concerned with drawing Preferred approach uses buffer objects All drawing done in terms of vertex arrays Programming style differs

### Computer Graphics. Illumination and Shading

() Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

### 3D Modeling. 3D Modeling 1

3D Modeling 3D Modeling 1 Virtual enviroments can be populated with "models" as well as regular geometries (glut shapes, glu quadrics, gl primitives). Models are: collections of primitives often in a display

### Automatic translation from CUDA to C++ Luca Atzori, Vincenzo Innocente, Felice Pantaleo, Danilo Piparo

Automatic translation from CUDA to C++ Luca Atzori, Vincenzo Innocente, Felice Pantaleo, Danilo Piparo 31 August, 2015 Goals Running CUDA code on CPUs. Why? Performance portability! A major challenge faced

### 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

### GLSL Language Details

GLSL Language Details 41 Design Focus Based on syntax of ANSI C Some additions to support graphics functionality Some additions from C++ Some differences for a cleaner language design December 9, 2005

### Design Focus. GLSL Language Details. Additions from C++ Additions for Graphics

GLSL Language Details Design Focus Based on syntax of ANSI C Some additions to support graphics functionality Some additions from C++ Some differences for a cleaner language design 41 December 9, 2005

### Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 2: First Program

Comp 410/510 Computer Graphics Spring 2017 Programming with OpenGL Part 2: First Program Objectives Refine the first program Introduce a standard program structure - Initialization Program Structure Most

### Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently

Rendering Pipeline Rendering Pipeline Converts geometric primitives into images Is split into several independent stages Those are usually executed concurrently Pipeline 18.10.2013 Steiner- Wallner- Podaras

### Rendering. Part 1 An introduction to OpenGL

Rendering Part 1 An introduction to OpenGL Olivier Gourmel VORTEX Team IRIT University of Toulouse gourmel@irit.fr Image synthesis The Graphics Processing Unit (GPU): A highly parallel architecture specialized

### WebGL A quick introduction. J. Madeira V. 0.2 September 2017

WebGL A quick introduction J. Madeira V. 0.2 September 2017 1 Interactive Computer Graphics Graphics library / package is intermediary between application and display hardware Application program maps

### 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

### Technische Universität München. GPU Programming. Rüdiger Westermann Chair for Computer Graphics & Visualization. Faculty of Informatics

GPU Programming Rüdiger Westermann Chair for Computer Graphics & Visualization Faculty of Informatics Overview Programming interfaces and support libraries The CUDA programming abstraction An in-depth

Advanced Computer Graphics Advanced Shader Programming G. Zachmann University of Bremen, Germany cgvr.cs.uni-bremen.de Recap Programmable vertex und fragment processors Expose what was already there anyway

### GLSL 1: Basics. J.Tumblin-Modified SLIDES from:

GLSL 1: Basics J.Tumblin-Modified SLIDES from: Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico and

Fall 2017 CSCI 420: Computer Graphics 5.2 Shading in OpenGL Hao Li http://cs420.hao-li.com 1 Outline Normal Vectors in OpenGL Polygonal Shading Light Sources in OpenGL Material Properties in OpenGL Example:

### Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

### GPU 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

### Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th 1. a. Show that the following sequences commute: i. A rotation and a uniform scaling ii. Two rotations about the same axis iii. Two

Last Time? Programmable GPUS Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes frame buffer depth buffer stencil buffer Stencil Buffer Homework 4 Reading for Create some geometry "Rendering

### An Overview GLUT GLSL GLEW

OpenGL, GLUT, GLEW, GLSL An Overview GLUT GLEW GLSL Objectives Give you an overview of the software that you will be using this semester OpenGL, GLUT, GLEW, GLSL What are they? How do you use them? What

### CS452/552; EE465/505. Image Processing Frame Buffer Objects

CS452/552; EE465/505 Image Processing Frame Buffer Objects 3-12 15 Outline! Image Processing: Examples! Render to Texture Read: Angel, Chapter 7, 7.10-7.13 Lab3 new due date: Friday, Mar. 13 th Project#1

### RECITATION - 1. Ceng477 Fall

RECITATION - 1 Ceng477 Fall 2007-2008 2/ 53 Agenda General rules for the course General info on the libraries GLUT OpenGL GLUI Details about GLUT Functions Probably we will not cover this part 3/ 53 General

### An Introduction to GPU Computing and CUDA Architecture

An Introduction to GPU Computing and CUDA Architecture Sarah Tariq, NVIDIA Corporation GPU Computing GPU: Graphics Processing Unit Traditionally used for real-time rendering High computational density

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

CSE 167: Introduction to Computer Graphics Lecture #7: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due Friday 4/22 at 2pm Midterm #1 on

### Rendering Subdivision Surfaces Efficiently on the GPU

Rendering Subdivision Surfaces Efficiently on the GPU Gy. Antal, L. Szirmay-Kalos and L. A. Jeni Department of Algorithms and their Applications, Faculty of Informatics, Eötvös Loránd Science University,

### Particle Systems with Compute & Geometry Shader. Institute of Computer Graphics and Algorithms Vienna University of Technology

Particle Systems with Compute & Geometry Shader Institute of Computer Graphics and Algorithms Vienna University of Technology Motivation https://www.youtube.com/watch?v=spwbwtu9xyk 24.11.2016 RTR 2016

### CUDA C/C++ BASICS. NVIDIA Corporation

CUDA C/C++ BASICS NVIDIA Corporation What is CUDA? CUDA Architecture Expose GPU parallelism for general-purpose computing Retain performance CUDA C/C++ Based on industry-standard C/C++ Small set of extensions

### Introduction to Computer Graphics with OpenGL/GLUT

Introduction to Computer Graphics with OpenGL/GLUT What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image

### Technical Report. GLSL Pseudo-Instancing

Technical Report GLSL Pseudo-Instancing Abstract GLSL Pseudo-Instancing This whitepaper and corresponding SDK sample demonstrate a technique to speed up the rendering of instanced geometry with GLSL. The

### Lecture 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