Engenharia Informática Computação Gráfica

Size: px
Start display at page:

Download "Engenharia Informática Computação Gráfica"

Transcription

1 Computação Gráfica Engenharia Informática OpenGL Shading Language - GLSL Computação Gráfica 1

2 OpenGL Shading Language! The 'Red Book' is known to be the gold standard for OpenGL;! The 'Orange Book' is considered to be the gold standard for the OpenGL Shading Language (GLSL)! This language has been made part of the OpenGL standard as of OpenGL 2.0. OpenGL Shading Language OpenGL Shading Language (GLSL) Reference Pages OpenGL Shading Language! Known as GLSL! Part of core OpenGL 2.0 and higher! Uses a C-like language! Authoring of vertex and fragment shaders! Later added geometry shaders (OpenGL 3.0) and tessellation shaders (OpenGL 4.0) 2

3 Versions and Extensions in OpenGL! OpenGL is constantly evolving! New core version updates:! 2.0, 3.0, 4.5! OpenGL also supports extensions! Using new versions and extensions! Possible using GetProcAddress API to ask driver for entry-point for new commands! OpenGL Extension Wrangler Library (GLEW)! Regularly updated to support all available OpenGL extensions and versions! Linking with GLEW keeps you from dealing with GetProcAddress hassles! Details! Link with lglew! Call glewinit() right after creating an OpenGL context! Call OpenGL new version and extension routines Credits: Mark Kilgard (CS 354), University of Texas OpenGL! OpenGL tem já várias versões! OpenGL 1.0 (1992)!! OpenGL 2.0 (2004)! introdução do GLSL!! OpenGL 3.0 (2008)! Suporte para Geometry Shader!! OpenGL 4.3 (2012) Vertex shader and fragment shader! Suporte para Tesselation Shader e Compute Shader! Melhoramentos na transferência de dados entre shaders 3

4 GLSL - Shaders! The recent trend in graphics hardware has been to replace fixed functionality with programmability in areas that have grown exceedingly complex.! Two such areas are vertex processing and fragment processing.! OpenGL provides mechanisms for compiling shaders and linking them to form executable code called a PROGRAM. A program can run on the programmable processing units (GPU) Pipeline Gráfico GPU Créditos: A. Fernandes, Univ. Minho 4

5 GLSL! The OpenGL Shading Language is a high-level procedural language.! It is part of standard OpenGL (i.e., OpenGL 2.0), the leading crossplatform, operating environment-independent API for 3D graphics.! The same language, with a small set of differences, is used for both vertex and fragment shaders.! It is based on C and C++ syntax and flow control.! It natively supports vector and matrix operations since these are inherent to many graphics algorithms.! It is stricter with types than C and C++, and functions are called by value-return.! It uses type qualifiers rather than reads and writes to manage input and output.! It imposes no practical limits to a shader's length, nor does the shader length need to be queried. Shaders! With each new generation of graphics hardware, more complex rendering techniques can be implemented as OpenGL shaders and can be used in real-time rendering applications.! OpenGL Shaders are programs that run on the GPU.! The fact that these techniques can now be implemented with hardware acceleration means that rendering performance can be increased dramatically and at the same time the CPU can be off-loaded so that it can perform other tasks. 5

6 Shaders! Here's a brief list of what s possible with OpenGL shaders:! Increasingly realistic materials metals, stone, wood, paints, and so on! Increasingly realistic lighting effects area lights, soft shadows, and so on! Natural phenomena fire, smoke, water, clouds, and so on! Advanced rendering effects global illumination, ray-tracing, and so on! Non-photorealistic materials painterly effects, pen-and-ink drawings, simulation of illustration techniques, and so on! New uses for texture memory storage of normals, gloss values, polynomial coefficients, and so on! Procedural textures dynamically generated 2D and 3D textures, not static texture images! Image processing convolution, unsharp masking, complex blending, and so on! Animation effects key frame interpolation, particle systems, procedurally defined motion! User programmable antialiasing methods! General computation sorting, mathematical modeling, fluid dynamics, and so on Vertex processor! The VERTEX PROCESSOR is a programmable unit that operates on incoming vertex values and their associated data.! The vertex processor usually performs traditional graphics operations such as the following:! Vertex transformation! Normal transformation and normalization! Texture coordinate generation! Texture coordinate transformation! Lighting! Color material application 6

7 Fragment processor! The FRAGMENT PROCESSOR is a programmable unit that operates on fragment values and their associated data.! The fragment processor usually performs traditional graphics operations such as the following:! Operations on interpolated values! Texture access! Texture application! Fog! Color sum GLSL - Language Overview! GLSL is based on the syntax of the ANSI C programming language. Programs written in this language look very much like C programs (to make the language easier to use).! The basic structure of programs written in the GLSL is the same as it is for programs written in C. The entry point of a set of shaders is the function void main();.! Constants, identifiers, operators, expressions, and statements are basically the same for the GLSL as they are for C.! Control flow for looping, if-then-else, and function calls are virtually identical to C. 7

8 GLSL - Language Overview! Addiction to C! Vector types are supported for floating-point, integer, and Boolean values.! For floating-point values, these vector types are referred to as vec2 (two floats), vec3 (three floats), and vec4 (four floats)! Floating-point matrix types are also supported as basic types.! The data type mat2 refers to a 2x2 matrix of floating-point values, mat3 refers to a 3x3 matrix, and mat4 refers to a 4x4matrix.! Columns of a matrix can be selected with array syntax.! Non-square matrices.! Samplers are a special type of opaque variable that access a particular texture map.! A variable of type sampler1d can be used to access a 1D texture map, a variable of type sampler2d can be used to access a 2D texture map, and so on. GLSL - Language Overview! Addiction to C! Qualifiers have been added to manage the input and output of shaders. The attribute, uniform, and varying qualifiers specify what type of input or output a variable serves.! Attribute variables communicate frequently changing values from the application to a vertex shader;! uniform variables communicate infrequently changing values from the application to any shader;! varying variables communicate interpolated values from a vertex shader to a fragment shader. 8

9 GLSL - Language Overview! Shaders written in the GLSL can use built-in variables that begin with the reserved prefix "gl_" in order to access existing OpenGL state and to communicate with the fixed functionality of OpenGL.! The vertex shader must write the special variable gl_position in order to provide necessary information to the fixed functionality stages between vertex processing and fragment processing.! A fragment shader typically writes into one or both of the special variables gl_fragcolor or gl_fragdepth. GLSL - Language Overview! A variety of built-in functions is also provided in the OpenGL Shading Language. The language defines built-in functions for a variety of operations:! Trigonometric operations sine, cosine, tangent, and so on! Exponential operations power, exponential, logarithm, square root, and inverse square root! Common math operations absolute value, floor, ceiling, fractional part, modulus, and so on! Geometric operations length, distance, dot product, cross product, normalization, and so on! Relational operations based on vectors component-wise operations such as greater than, less than, equal to, and so on! Specialized fragment shader functions for computing derivatives and estimating filter widths for antialiasing! Functions for accessing values in texture memory! Functions that return noise values for procedural texturing effects 9

10 GLSL - Language Overview! Addiction from C++! it supports function overloading to make it easy to define functions that differ only in the type or number of arguments being passed.! For instance, the dot product function is overloaded to deal with arguments that are types float, vec2, vec3, and vec4.! The concept of constructors also comes from C++. Initializers are done only with constructors in the GLSL.! Variables can be declared when they are needed;! The basic type bool is supported as in C++.! Functions must be declared before being used. GLSL - Language Overview! C Features not supported (not suited for GPUs)! Unlike ANSI C, the GLSL does not support automatic promotion of data types. Compiler errors are generated if variables used in an expression are of different types.! For instance, an error is generated for the statement float f = 0; but not for the statement float f = 0.0;! GLSL does not support pointers, strings, or characters.! It not support also unions, enumerated types, bit fields in structures, and bitwise operators.! It is not file based, so you won't see any #include directives or other references to file names.! goto, standard C library stuff like printf and malloc 10

11 GLSL - Language Overview! Some concepts:! The vertex shader is executed once for every vertex provided to OpenGL.! The fragment shader is executed once for every fragment (i.e., every pixel) that is produced by rasterization.! When vertex or fragment shaders are used, the corresponding fixed functionality is disabled. Shaders must implement such functionality themselves if it is desired.! Varying variables defined in a vertex shader are per-vertex values that are output from the vertex processor.! An application can communicate directly with a vertex shader in two ways:! by using attribute variables and! by using uniform variables GLSL - Language Overview! Some concepts:! Attribute variables are expected to change frequently and may be supplied by the application as often as every vertex.! Applications can pass arbitrary vertex data to a vertex shader with user-defined attribute variables. Applications can pass standard vertex attributes (color, normal, texture coordinates, position, etc.) to a vertex shader with built-in attribute variables.! An application communicates directly with a fragment shader with uniform variables.! Uniform variables are expected to change relatively infrequently (at a minimum, they are constant for an entire graphics primitive). 11

12 GLSL - Language Overview! SUMMARY! The language is based on the syntax of C; Basic structure and many keywords are the same as in C.! Vectors and matrices are included in the language as basic types.! Type qualifiers attribute, uniform, and varying are added to describe variables that manage shader I/O.! Variables of type attribute allow the communication of frequently changing values from the application to the vertex shader.! Variables of type varying are the output from a vertex shader and the input to a fragment shader.! Variables of type uniform allow the application to provide relatively infrequently changing values to both vertex shaders and fragment shaders.! The data type sampler is added for accessing textures. GLSL - Language Overview! To install and use OpenGL shaders 1. Create one or more shader objects by calling glcreateshader. 2. Provide source code for these shaders by calling glshadersource. 3. Compile each of the shaders by calling glcompileshader. 4. Create a program object by calling glcreateprogram. 5. Attach all the shader objects to the program object by calling glattachshader. 6. Link the program object by calling gllinkprogram. 7. Install the executable program as part of OpenGL's current state by calling gluseprogram. 12

13 GLSL - Implementation! GLSL is built into OpenGL drivers! The graphics driver contains an optimizing compiler for a highlevel language! Targeting a complex, dedicate processor! What could possibly go wrong?! Test your shaders on hardware from different vendors!! GLSL shaders compiled to hardware-dependent! All details are hidden from the OpenGL application programmer! Provides very little visibility into compiled result! NVIDIA s Cg Toolkit contains compiler (cgc) for Cg and GLSL code GLSL Data Types! Scalars! float a single single-precision floating-point scalar! int declares a single integer number! uint an unsigned integer! bool declares a single Boolean number! double a single double-precision floating point scalar! These declare variables, as is familiar from C/C++.! float f;! float g, h = 2.4;! int NumTextures = 4;! bool skipprocessing; 13

14 GLSL Data Types! Vectors! Vector data types built into language! Supports swizzling, masking, and operators! Swizzling/mask example: foo.zyx = foo.xxy! Operators like +, -, *, and / do component-wise operations! Also supports vector-with-scalar operations! Type names! Floating-point vectors: vec2, vec3, vec4! Integer vectors: ivec2, ivec3, ivec4! Boolean vectors: bvec2, bvec3, bvec4! Double-precision vectors: dvec2, dvec3, dvec4! Standard library support! dot, length, normalize, reflect, etc.! sin, cos, etc. GLSL Data Types! Vectors details! Special features of vectors include component access that can be done either through field selection (as with structures) or as array accesses.! vec3 position = position (1.0, 2.0, 3.0)! it can be considered as the vector (x, y, z);! position.x will select the first component of the vector.! Aggregate initializiers aren t allowed vec3 position = { 1.0, 2.0, 3.0 } 14

15 GLSL Data Types! Vectors (or Arrays)! Arrays of any type can be created.! For example, vec4 points[]; // points is an array of unknown size vec4 points[10]; // points is now an array of size vec4 points[]; // points is an array of unknown size points[2] = vec4(1.0); // points is now an array of size 2 points[7] = vec4(2.0); // points is now an array of size 7 GLSL Data Types! Vectors details! The following names are available for selecting components of vectors:! x, y, z, w Treat a vector as a position or direction! r, g, b, a Treat a vector as a color! s, t, p, q Treat a vector as a texture coordinate! vec3 position = position (1.0, 2.0, 3.0) position.z! vec3 color= color(1.0, 0.0, 0.0) color.r! vec4 texture= texture(1.0, 0.0, 0.0, 1.0) texture.t 15

16 GLSL Data Types! Vectors details vec4 v4; v4.rgba; // is a vec4 -> v4, v4.rgb; // is a vec3, v4.b; // is a float, v4.xy; // is a vec2, v4.xgba; // is illegal vec4 pos = vec4(1.0, 2.0, 3.0, 4.0); vec4 swiz = pos.wzyx; // swiz = (4.0, 3.0, 2.0, 1.0) vec4 dup = pos.xxyy; // dup = (1.0, 1.0, 2.0, 2.0) pos.xw = vec2(5.0, 6.0); // pos = (5.0, 2.0, 3.0, 6.0) pos.wx = vec2(7.0, 8.0); // pos = (8.0, 2.0, 3.0, 7.0) vec3 v, u; float f; v = u + f; v.x = u.x + f; v.y = u.y + f; v.z = u.z + f; is equivalent to vec3 v, u, w; w = v + u; is equivalent to w.x = v.x + u.x; w.y = v.y + u.y; w.z = v.z + u.z; GLSL Data Types! Vectors details! To compare two vectors! The functions: equal, notequal, lessthan,! a vector can be turned into a scalar Boolean with:! The functions: any or all.! Example: vec4 u, v;!...! if (any(lessthan(u, v)))!...! 16

17 GLSL Data Types! Matrices! Built-in types are available for matrices of floating-point numbers.! There are 2x2, 3x3, and 4x4 sizes. Non-square matrices: mat4x2, etc.! Operator * does matrix-by-vector and matrix-by-matrix multiplication! You may access a matrix as an array of column vectors! If transform is a mat4, transform[2] is the third column of transform.! The resulting type of transform[2] is vec4.! Column 0 is the first column.! transform[3][1] is the second component of the vector forming the fourth column of transform.! Just remember that the first index selects the column, not the row, and the second index selects the row. mat4 m = mat4(3.0); // initializes the diagonal to all 3.0! vec4 v;! v = m[1]; // places the vector (0.0, 3.0, 0.0, 0.0) into v! GLSL Data Types! Samplers! GLSL provides a simple opaque handle to encapsulate lookup of textures. These handles are called SAMPLERS.! The sampler types available are:! sampler1d Accesses a one-dimensional texture! sampler2d Accesses a two-dimensional texture! sampler3d Accesses a three-dimensional texture! samplercube Accesses a cube-map texture! sampler1dshadow Accesses a one-dimensional depth texture with comparison! sampler2dshadow Accesses a two-dimensional depth texture with comparison 17

18 GLSL Data Types! Samplers! For example, a sampler could be declared as uniform sampler2d Grass;! This variable can then be passed into a corresponding texture lookup function to access a texture: vec4 color = texture2d(grass, coord); where coord is a vec2 holding the two-dimensional position used to index the grass texture, and color is the result of doing the texture lookup. GLSL Data Types! Structures! GLSL provides user-defined structures similar to C.! For example, struct light { vec3 position; vec3 color; }; light ceilinglight; 18

19 GLSL Data Types! Initializers and Constructors! A shader variable may be initialized when it is declared. For example: float a, b = 3.0, c;! Constant qualified variables must be initialized. const int Size = 4; // initializer is required! Attribute, uniform, and varying variables cannot be initialized when declared. attribute float Temperature; // no initializer allowed, // the vertex API sets this uniform int Size; // no initializer allowed, // the uniform setting API sets this varying float density; // no initializer allowed, the vertex // shader must programmatically set this GLSL Data Types! Initializers and Constructors! There are constructors for all the built-in types (except samplers) as well as for structures. Some examples: vec4 v = vec4(1.0, 2.0, 3.0, 4.0); ivec2 c = ivec2(3, 4); vec3 color = vec3(0.2, 0.5, 0.8); vec4 color4 = vec4(color, 1.0) struct light { vec4 position; struct tlightcolor { vec3 color; float intensity; } lightcolor; } light1 = light(v, tlightcolor(color, 0.9)); 19

20 GLSL Data Types! Initializers and Constructors! For matrices, the components are written in column major order. For example, mat2 m = mat2(1.0, 2.0, 3.0, 4.0); vec3 v = vec3(0.6); is equivalent to vec3 v = vec3(0.6, 0.6, 0.6); //makes a 2x2 identity matrix mat2 m = mat2(1.0); is equivalent to // makes a 2 x 2 identity matrix mat2 m = mat2(1.0, 0.0, 0.0, 1.0); vec4 v = vec4(1.0); vec2 u = vec2(v); //the first two components of v initialize u GLSL Data Types! Qualifiers and Interface to a Shader! The following is the list of qualifiers:! attribute - For frequently changing information, from the application to a vertex shader;! uniform - For infrequently changing information, from the application to either a vertex shader or a fragment shader;! varying - For interpolated information passed from a vertex shader to a fragment shader;! const - For declaring nonwritable, compile-time constant variables, as in C; If no qualifier is specified when a variable (not a function parameter) is declared, the variable can be both read and written by the shader. 20

21 GLSL Data Types! Flow Control! Looping can be done with for, while, and do-while, just as in C++.! Variables can be declared in for and while statements, and their scope lasts until the end of their substatements.! The keywords break and continue also exist and behave as in C.! Selection can be done with if and if-else, just as in C++, with the exception that a variable cannot be declared in the if statement.! Selection by means of the selection operator (?:) is also available, with the extra constraint that the second and third operands must have exactly the same type.! As in C, the right-hand operand to logical and (&&) is not evaluated if the left-hand operand evaluates to false, and the right-hand operand to logical or ( ) is not evaluated if the left-hand operand evaluates to true. GLSL Data Types! Functions - Calling Conventions! To specify which parameters are copied when, prefix them with the qualifier keywords in, out, or inout.! For something that is just copied into the function but not returned, use in.! The in qualifier is also implied when no qualifiers are specified.! To say a parameter is not to be copied in but is to be set and copied back on return, use the qualifier out.! To say a parameter is copied both in and out, use the qualifier inout.! in Copy in but don't copy back out; still writable within the function! out Only copy out; readable, but undefined at entry to function! inout Copy in and copy out! The const qualifier can also be applied to function parameter (i.e. only for in). 21

22 GLSL Data Types! Qualifiers! Shaders are excepted to process inputs and write outputs! Type qualifiers identify these special variables! Vertex input qualifier: attribute! Vertex-fragment interface qualifier: varying! Shader parameters initialized by driver: uniform! out for vertex shader varying;! in for fragment shader varying One problem with GLSL is deprecation! GLSL - Other Details! C preprocessor functionality available! Has its own extension and version mechanism! Entry function must be named main()! See GLSL manual for more details. 22

23 GLSL Summary! Applications can provide data to shaders with userdefined attribute variables and user-defined uniform variables.! Standard OpenGL attributes can be accessed from within a vertex shader by means of built-in attribute variable names;! A variety of OpenGL state is accessible from either vertex shaders or fragment shaders by: uniform variables;! Vertex shaders communicate results: output variables and built-in varying variables;! Fragment shaders obtain the results from: fragment shader input variables and built-in varying variables;! Fragment shaders communicate results: output variables;! Built-in constants are accessible from within both types of shaders. Vertex Shader Inputs & Outputs Credits: Mark Kilgard (CS 354), University of Texas 23

24 Fragment Shader Ins & Outs Credits: Mark Kilgard (CS 354), University of Texas API Process for Creating GLSL Programs! Create & compile vertex & fragment shader! Attach shaders & link program Vertex Shader Program glcreateprogram glattachshader glattachshader gllinkprogram gluseprogram Credits: Mark Kilgard (CS 354), University of Texas glcreateshader glshadersource glcompileshader Fragment Shader glcreateshader glshadersource glcompileshader 24

25 Consider a Light Map Shader x = Precomputed light Surface color lit surface! Multiple two textures component-wise Credits: Mark Kilgard (CS 354), University of Texas Images from: Light Map with Fixed Function OpenGL API GLuint lightmap; GLuint surfacemap; glactivetexture(gl_texture0); glenable(gl_texture_2d); glbindtexture(gl_texture_2d, lightmap); gltexenvi(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); glactivetexture(gl_texture1); glenable(gl_texture_2d); glbindtexture(gl_texture_2d, surfacemap); gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); gldrawarrays(...); Credits: Mark Kilgard (CS 354), University of Texas 25

26 Light Map with Fixed Function OpenGL API GLuint lightmap; GLuint surfacemap; glactivetexture(gl_texture0); glenable(gl_texture_2d); Tell fixed function we are using texture mapping glbindtexture(gl_texture_2d, lightmap); gltexenvi(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); glactivetexture(gl_texture1); glenable(gl_texture_2d); glbindtexture(gl_texture_2d, surfacemap); gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); gldrawarrays(...); Tell fixed function how to combine textures Credits: Mark Kilgard (CS 354), University of Texas Light Map Shader Example in GLSL! Write a fragment shader in GLSL #version 330 uniform sampler2d lightmap; uniform sampler2d surfacemap; in vec2 fs_txcoord; out vec3 out_color; void main(void) { } float intensity = texture2d(lightmap, fs_txcoord).r; vec3 color = texture2d(surfacemap, fs_txcoord).rgb; out_color = intensity * color; Credits: Mark Kilgard (CS 354), University of Texas 26

27 Light Map Shader Example in GLSL! Write a fragment shader in GLSL #version 330 uniform sampler2d lightmap; uniform sampler2d surfacemap; GLSL version 3.3 Textures (input) in vec2 fs_txcoord; out vec3 out_color; void main(void) { } Per-fragment input shader output one channel intensity float intensity = texture2d(lightmap, fs_txcoord).r; vec3 color = texture2d(surfacemap, fs_txcoord).rgb; out_color = intensity * color; three channel color modulate Credits: Mark Kilgard (CS 354), University of Texas Switching the Application to use GLSL Shaders! Recall the fixed function light map in C/C++! What code can be eliminated? GLuint lightmap; GLuint surfacemap; glactivetexture(gl_texture0); glenable(gl_texture_2d); glbindtexture(gl_texture_2d, lightmap); gltexenvi(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); glactivetexture(gl_texture1); glenable(gl_texture_2d); glbindtexture(gl_texture_2d, surfacemap); gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_MODULATE); Credits: Mark Kilgard (CS 354), University of Texas 27

28 Switching the Application to use GLSL Shaders " Added code to use GLSL shaders GLuint lightmap; GLuint surfacemap; GLuint program; glactivetexture(gl_texture0); glbindtexture(gl_texture_2d, lightmap); glactivetexture(gl_texture1); glbindtexture(gl_texture_2d, surfacemap); gluseprogram(program); gldrawarray(...); Credits: Mark Kilgard (CS 354), University of Texas Careful: What s not shown! This example cuts a number of corners! The example leaves out code for! Initializing and loading the image data for the two textures! The vertex shader that outputs the varying fs_txcoord texture coordinate set! GLSL shader compilation and linking code to create the program object! Setting the sampler units of lightmap and surfacemap to point at texture units 1 and 2! Use gluniform1i for this Credits: Mark Kilgard (CS 354), University of Texas 28

Introduction to Computer Graphics with WebGL

Introduction 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 1 Programming

More information

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University GPU Generations CSE 564: Visualization GPU Programming (First Steps) Klaus Mueller Computer Science Department Stony Brook University For the labs, 4th generation is desirable Graphics Hardware Pipeline

More information

CS418 GLSL Shader Programming Tutorial (I) Shader Introduction. Presented by : Wei-Wen Feng 3/12/2008

CS418 GLSL Shader Programming Tutorial (I) Shader Introduction. Presented by : Wei-Wen Feng 3/12/2008 CS418 GLSL Shader Programming Tutorial (I) Shader Introduction Presented by : Wei-Wen Feng 3/12/2008 MP3 MP3 will be available around Spring Break Don t worry, you got two more weeks after break. Use shader

More information

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg Image Processing and Computer Graphics Rendering Pipeline Matthias Teschner Computer Science Department University of Freiburg Outline introduction rendering pipeline vertex processing primitive processing

More information

Introduction to GPGPU. Tiziano Diamanti t.diamanti@cineca.it

Introduction to GPGPU. Tiziano Diamanti t.diamanti@cineca.it t.diamanti@cineca.it Agenda From GPUs to GPGPUs GPGPU architecture CUDA programming model Perspective projection Vectors that connect the vanishing point to every point of the 3D model will intersecate

More information

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group Shader Model 3.0 Ashu Rege NVIDIA Developer Technology Group Talk Outline Quick Intro GeForce 6 Series (NV4X family) New Vertex Shader Features Vertex Texture Fetch Longer Programs and Dynamic Flow Control

More information

The OpenGL Shading Language

The OpenGL Shading Language The OpenGL Shading Language Language Version: 1.20 Document Revision: 8 07-Sept-2006 John Kessenich Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright 2002-2006 3Dlabs, Inc. Ltd. This

More information

Vertex and fragment programs

Vertex and fragment programs Vertex and fragment programs Jon Hjelmervik email: jonmi@ifi.uio.no 1 Fixed function transform and lighting Each vertex is treated separately Affine transformation transforms the vertex by matrix multiplication

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

More information

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA The Evolution of Computer Graphics Tony Tamasi SVP, Content & Technology, NVIDIA Graphics Make great images intricate shapes complex optical effects seamless motion Make them fast invent clever techniques

More information

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007 Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Questions 2007 INSTRUCTIONS: Answer all questions. Spend approximately 1 minute per mark. Question 1 30 Marks Total

More information

OpenGL Performance Tuning

OpenGL Performance Tuning OpenGL Performance Tuning Evan Hart ATI Pipeline slides courtesy John Spitzer - NVIDIA Overview What to look for in tuning How it relates to the graphics pipeline Modern areas of interest Vertex Buffer

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1 Welcome to GUI! Mechanics 26/02/2014 1 Requirements Info If you don t know C++, you CAN take this class additional time investment required early on GUI Java to C++ transition tutorial on course website

More information

The OpenGL ES Shading Language

The OpenGL ES Shading Language The OpenGL ES Shading Language Language Version: 1.00 Document Revision: 17 12 May, 2009 Editor: Robert J. Simpson (Editor, version 1.00, revisions 1-11: John Kessenich) ii Copyright (c) 2006-2009 The

More information

Vector Math Computer Graphics Scott D. Anderson

Vector Math Computer Graphics Scott D. Anderson Vector Math Computer Graphics Scott D. Anderson 1 Dot Product The notation v w means the dot product or scalar product or inner product of two vectors, v and w. In abstract mathematics, we can talk about

More information

NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 www.nvidia.com

NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 www.nvidia.com Release 1.1 February 2003 Cg Language Toolkit ALL DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, "MATERIALS") ARE BEING PROVIDED

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

GPU Shading and Rendering: Introduction & Graphics Hardware

GPU Shading and Rendering: Introduction & Graphics Hardware GPU Shading and Rendering: Introduction & Graphics Hardware Marc Olano Computer Science and Electrical Engineering University of Maryland, Baltimore County SIGGRAPH 2005 Schedule Shading Technolgy 8:30

More information

#820 Computer Programming 1A

#820 Computer Programming 1A Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement Semester 1

More information

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series By: Binesh Tuladhar Clay Smith Overview History of GPU s GPU Definition Classical Graphics Pipeline Geforce 6 Series Architecture Vertex

More information

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005 Recent Advances and Future Trends in Graphics Hardware Michael Doggett Architect November 23, 2005 Overview XBOX360 GPU : Xenos Rendering performance GPU architecture Unified shader Memory Export Texture/Vertex

More information

The OpenGL ES Shading Language

The OpenGL ES Shading Language The OpenGL ES Shading Language Language Version: 3.10 Document Revision: 4 29 April 2015 Editor: Robert J. Simpson, Qualcomm OpenGL GLSL editor: John Kessenich, LunarG GLSL version 1.1 Authors: John Kessenich,

More information

INTRODUCTION TO RENDERING TECHNIQUES

INTRODUCTION TO RENDERING TECHNIQUES INTRODUCTION TO RENDERING TECHNIQUES 22 Mar. 212 Yanir Kleiman What is 3D Graphics? Why 3D? Draw one frame at a time Model only once X 24 frames per second Color / texture only once 15, frames for a feature

More information

Optimizing AAA Games for Mobile Platforms

Optimizing AAA Games for Mobile Platforms Optimizing AAA Games for Mobile Platforms Niklas Smedberg Senior Engine Programmer, Epic Games Who Am I A.k.a. Smedis Epic Games, Unreal Engine 15 years in the industry 30 years of programming C64 demo

More information

Writing Applications for the GPU Using the RapidMind Development Platform

Writing Applications for the GPU Using the RapidMind Development Platform Writing Applications for the GPU Using the RapidMind Development Platform Contents Introduction... 1 Graphics Processing Units... 1 RapidMind Development Platform... 2 Writing RapidMind Enabled Applications...

More information

Tutorial 9: Skeletal Animation

Tutorial 9: Skeletal Animation Tutorial 9: Skeletal Animation Summary In the last couple of tutorials, you ve seen how to create a scene graph, and implemented a simple animating cube robot using them. You re probably wondering how

More information

Computer Graphics Hardware An Overview

Computer Graphics Hardware An Overview Computer Graphics Hardware An Overview Graphics System Monitor Input devices CPU/Memory GPU Raster Graphics System Raster: An array of picture elements Based on raster-scan TV technology The screen (and

More information

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER RAMA HOETZLEIN, DEVELOPER TECHNOLOGY, NVIDIA Data Visualizations assist humans with data analysis by representing information

More information

GPUs Under the Hood. Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology

GPUs Under the Hood. Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology GPUs Under the Hood Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology Bandwidth Gravity of modern computer systems The bandwidth between key components

More information

Introduction to Computer Graphics

Introduction to Computer Graphics Introduction to Computer Graphics Torsten Möller TASC 8021 778-782-2215 torsten@sfu.ca www.cs.sfu.ca/~torsten Today What is computer graphics? Contents of this course Syllabus Overview of course topics

More information

OpenGL "Hello, world!"

OpenGL Hello, world! OpenGL "Hello, world!" by Ian Romanick This work is licensed under the Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) License. To view a copy of this license, (a) visit http://creativecommons.org/licenses/by-nc-sa/3.0/;

More information

3D Augmented Reality Mobile Application Prototype for Visual Planning Support

3D Augmented Reality Mobile Application Prototype for Visual Planning Support 3D Augmented Reality Mobile Application Prototype for Visual Planning Support Arnau Fombuena Valero Master s of Science Thesis in Geoinformatics TRITA-GIT EX 11-010 School of Architecture and the Built

More information

QCD as a Video Game?

QCD as a Video Game? QCD as a Video Game? Sándor D. Katz Eötvös University Budapest in collaboration with Győző Egri, Zoltán Fodor, Christian Hoelbling Dániel Nógrádi, Kálmán Szabó Outline 1. Introduction 2. GPU architecture

More information

Lecture Notes, CEng 477

Lecture Notes, CEng 477 Computer Graphics Hardware and Software Lecture Notes, CEng 477 What is Computer Graphics? Different things in different contexts: pictures, scenes that are generated by a computer. tools used to make

More information

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA GFLOPS 3500 3000 NVPRO-PIPELINE Peak Double Precision FLOPS GPU perf improved

More information

Java (12 Weeks) Introduction to Java Programming Language

Java (12 Weeks) Introduction to Java Programming Language Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short

More information

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries First Semester Development 1A On completion of this subject students will be able to apply basic programming and problem solving skills in a 3 rd generation object-oriented programming language (such as

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS ICCVG 2002 Zakopane, 25-29 Sept. 2002 Rafal Mantiuk (1,2), Sumanta Pattanaik (1), Karol Myszkowski (3) (1) University of Central Florida, USA, (2) Technical University of Szczecin, Poland, (3) Max- Planck-Institut

More information

Developer Tools. Tim Purcell NVIDIA

Developer Tools. Tim Purcell NVIDIA Developer Tools Tim Purcell NVIDIA Programming Soap Box Successful programming systems require at least three tools High level language compiler Cg, HLSL, GLSL, RTSL, Brook Debugger Profiler Debugging

More information

Image Synthesis. Transparency. computer graphics & visualization

Image Synthesis. Transparency. computer graphics & visualization Image Synthesis Transparency Inter-Object realism Covers different kinds of interactions between objects Increasing realism in the scene Relationships between objects easier to understand Shadows, Reflections,

More information

GPGPU Computing. Yong Cao

GPGPU Computing. Yong Cao GPGPU Computing Yong Cao Why Graphics Card? It s powerful! A quiet trend Copyright 2009 by Yong Cao Why Graphics Card? It s powerful! Processor Processing Units FLOPs per Unit Clock Speed Processing Power

More information

El Dorado Union High School District Educational Services

El Dorado Union High School District Educational Services El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming II (#495) Rationale: A continuum of courses, including advanced classes in technology is needed.

More information

OpenGL Shading Language Course. Chapter 5 Appendix. By Jacobo Rodriguez Villar jacobo.rodriguez@typhoonlabs.com

OpenGL Shading Language Course. Chapter 5 Appendix. By Jacobo Rodriguez Villar jacobo.rodriguez@typhoonlabs.com OpenGL Shading Language Course Chapter 5 Appendix By Jacobo Rodriguez Villar jacobo.rodriguez@typhoonlabs.com TyphoonLabs GLSL Course 1/1 APPENDIX INDEX Using GLSL Shaders Within OpenGL Applications 2

More information

VB.NET Programming Fundamentals

VB.NET Programming Fundamentals Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

More information

Computer Programming I

Computer Programming I Computer Programming I Levels: 10-12 Units of Credit: 1.0 CIP Code: 11.0201 Core Code: 35-02-00-00-030 Prerequisites: Secondary Math I, Keyboarding Proficiency, Computer Literacy requirement (e.g. Exploring

More information

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch. CSCI 480 Computer Graphics Lecture 1 Course Overview January 14, 2013 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s13/ Administrative Issues Modeling Animation

More information

A Proposal for OpenEXR Color Management

A Proposal for OpenEXR Color Management A Proposal for OpenEXR Color Management Florian Kainz, Industrial Light & Magic Revision 5, 08/05/2004 Abstract We propose a practical color management scheme for the OpenEXR image file format as used

More information

Radeon HD 2900 and Geometry Generation. Michael Doggett

Radeon HD 2900 and Geometry Generation. Michael Doggett Radeon HD 2900 and Geometry Generation Michael Doggett September 11, 2007 Overview Introduction to 3D Graphics Radeon 2900 Starting Point Requirements Top level Pipeline Blocks from top to bottom Command

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

The Future Of Animation Is Games

The Future Of Animation Is Games The Future Of Animation Is Games 王 銓 彰 Next Media Animation, Media Lab, Director cwang@1-apple.com.tw The Graphics Hardware Revolution ( 繪 圖 硬 體 革 命 ) : GPU-based Graphics Hardware Multi-core (20 Cores

More information

How To Use An Amd Graphics Card In Greece 2.5.1 And 2.4.1 (Amd) With Greege 2.3.5 (Greege) With An Amd Greeper 2.2.

How To Use An Amd Graphics Card In Greece 2.5.1 And 2.4.1 (Amd) With Greege 2.3.5 (Greege) With An Amd Greeper 2.2. AMD GPU Association Targeting GPUs for Load Balancing in OpenGL The contents of this document are provided in connection with Advanced Micro Devices, Inc. ( AMD ) products. THE INFORMATION IN THIS PUBLICATION

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

Debugging. Common Semantic Errors ESE112. Java Library. It is highly unlikely that you will write code that will work on the first go

Debugging. Common Semantic Errors ESE112. Java Library. It is highly unlikely that you will write code that will work on the first go Debugging ESE112 Java Programming: API, Psuedo-Code, Scope It is highly unlikely that you will write code that will work on the first go Bugs or errors Syntax Fixable if you learn to read compiler error

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

The OpenGL Shading Language

The OpenGL Shading Language The OpenGL Shading Language Language Version: 1.50 Document Revision: 11 04-Dec-2009 John Kessenich Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright (c) 2008-2009 The Khronos Group

More information

About The Tutorial. Audience. Prerequisites. Copyright & Disclaimer

About The Tutorial. Audience. Prerequisites. Copyright & Disclaimer About The Tutorial C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system.

More information

L20: GPU Architecture and Models

L20: GPU Architecture and Models L20: GPU Architecture and Models scribe(s): Abdul Khalifa 20.1 Overview GPUs (Graphics Processing Units) are large parallel structure of processing cores capable of rendering graphics efficiently on displays.

More information

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT COMP27112 Computer Graphics and Image Processing 2: Introducing image synthesis Toby.Howard@manchester.ac.uk 1 Introduction In these notes we ll cover: Some orientation how did we get here? Graphics system

More information

The OpenGL Shading Language

The OpenGL Shading Language The OpenGL Shading Language Language Version: 1.30 Document Revision: 10 22-Nov-2009 John Kessenich Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright (c) 2008 The Khronos Group Inc.

More information

Water Flow in. Alex Vlachos, Valve July 28, 2010

Water Flow in. Alex Vlachos, Valve July 28, 2010 Water Flow in Alex Vlachos, Valve July 28, 2010 Outline Goals & Technical Constraints How Artists Create Flow Maps Flowing Normal Maps in Left 4 Dead 2 Flowing Color Maps in Portal 2 Left 4 Dead 2 Goals

More information

Dynamic Resolution Rendering

Dynamic Resolution Rendering Dynamic Resolution Rendering Doug Binks Introduction The resolution selection screen has been one of the defining aspects of PC gaming since the birth of games. In this whitepaper and the accompanying

More information

A Crash Course on Programmable Graphics Hardware

A Crash Course on Programmable Graphics Hardware A Crash Course on Programmable Graphics Hardware Li-Yi Wei Abstract Recent years have witnessed tremendous growth for programmable graphics hardware (GPU), both in terms of performance and functionality.

More information

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1 Silverlight for Windows Embedded Graphics and Rendering Pipeline 1 Silverlight for Windows Embedded Graphics and Rendering Pipeline Windows Embedded Compact 7 Technical Article Writers: David Franklin,

More information

The OpenGL R Graphics System: A Specification (Version 3.3 (Core Profile) - March 11, 2010)

The OpenGL R Graphics System: A Specification (Version 3.3 (Core Profile) - March 11, 2010) The OpenGL R Graphics System: A Specification (Version 3.3 (Core Profile) - March 11, 2010) Mark Segal Kurt Akeley Editor (version 1.1): Chris Frazier Editor (versions 1.2-3.3): Jon Leech Editor (version

More information

Parallel Web Programming

Parallel Web Programming Parallel Web Programming Tobias Groß, Björn Meier Hardware/Software Co-Design, University of Erlangen-Nuremberg May 23, 2013 Outline WebGL OpenGL Rendering Pipeline Shader WebCL Motivation Development

More information

Game Development in Android Disgruntled Rats LLC. Sean Godinez Brian Morgan Michael Boldischar

Game Development in Android Disgruntled Rats LLC. Sean Godinez Brian Morgan Michael Boldischar Game Development in Android Disgruntled Rats LLC Sean Godinez Brian Morgan Michael Boldischar Overview Introduction Android Tools Game Development OpenGL ES Marketing Summary Questions Introduction Disgruntled

More information

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is

More information

Computer Graphics. Anders Hast

Computer Graphics. Anders Hast Computer Graphics Anders Hast Who am I?! 5 years in Industry after graduation, 2 years as high school teacher.! 1996 Teacher, University of Gävle! 2004 PhD, Computerised Image Processing " Computer Graphics!

More information

Interactive Visualization of Magnetic Fields

Interactive Visualization of Magnetic Fields JOURNAL OF APPLIED COMPUTER SCIENCE Vol. 21 No. 1 (2013), pp. 107-117 Interactive Visualization of Magnetic Fields Piotr Napieralski 1, Krzysztof Guzek 1 1 Institute of Information Technology, Lodz University

More information

OpenGL & Delphi. Max Kleiner. http://max.kleiner.com/download/openssl_opengl.pdf 1/22

OpenGL & Delphi. Max Kleiner. http://max.kleiner.com/download/openssl_opengl.pdf 1/22 OpenGL & Delphi Max Kleiner http://max.kleiner.com/download/openssl_opengl.pdf 1/22 OpenGL http://www.opengl.org Evolution of Graphics Assembler (demo pascalspeed.exe) 2D 3D Animation, Simulation (Terrain_delphi.exe)

More information

Performance Optimization and Debug Tools for mobile games with PlayCanvas

Performance Optimization and Debug Tools for mobile games with PlayCanvas Performance Optimization and Debug Tools for mobile games with PlayCanvas Jonathan Kirkham, Senior Software Engineer, ARM Will Eastcott, CEO, PlayCanvas 1 Introduction Jonathan Kirkham, ARM Worked with

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

Objective-C Tutorial

Objective-C Tutorial Objective-C Tutorial OBJECTIVE-C TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Objective-c tutorial Objective-C is a general-purpose, object-oriented programming

More information

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 PURDUE UNIVERSITY Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 Course Staff 1/31/2012 1 Introduction This tutorial is made to help the student use C language

More information

Learning Modern 3D Graphics Programming. Jason L. McKesson

Learning Modern 3D Graphics Programming. Jason L. McKesson Learning Modern 3D Graphics Programming Jason L. McKesson Learning Modern 3D Graphics Programming Jason L. McKesson Copyright 2012 Jason L. McKesson Table of Contents About this Book... iv Why Read This

More information

Data Visualization Using Hardware Accelerated Spline Interpolation

Data Visualization Using Hardware Accelerated Spline Interpolation Data Visualization Using Hardware Accelerated Spline Interpolation Petr Kadlec kadlecp2@fel.cvut.cz Marek Gayer xgayer@fel.cvut.cz Czech Technical University Department of Computer Science and Engineering

More information

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

Masters of Science in Software & Information Systems

Masters of Science in Software & Information Systems Masters of Science in Software & Information Systems To be developed and delivered in conjunction with Regis University, School for Professional Studies Graphics Programming December, 2005 1 Table of Contents

More information

NVIDIA Material Definition Language 1.1

NVIDIA Material Definition Language 1.1 NVIDIA Material Definition Language 1.1 Technical Introduction Document version 1.0 12 May 2014 NVIDIA Advanced Rendering Center Fasanenstraße 81 10623 Berlin phone +49.30.315.99.70 fax +49.30.315.99.733

More information

How To Teach Computer Graphics

How To Teach Computer Graphics Computer Graphics Thilo Kielmann Lecture 1: 1 Introduction (basic administrative information) Course Overview + Examples (a.o. Pixar, Blender, ) Graphics Systems Hands-on Session General Introduction http://www.cs.vu.nl/~graphics/

More information

AMD GPU Architecture. OpenCL Tutorial, PPAM 2009. Dominik Behr September 13th, 2009

AMD GPU Architecture. OpenCL Tutorial, PPAM 2009. Dominik Behr September 13th, 2009 AMD GPU Architecture OpenCL Tutorial, PPAM 2009 Dominik Behr September 13th, 2009 Overview AMD GPU architecture How OpenCL maps on GPU and CPU How to optimize for AMD GPUs and CPUs in OpenCL 2 AMD GPU

More information

Hardware design for ray tracing

Hardware design for ray tracing Hardware design for ray tracing Jae-sung Yoon Introduction Realtime ray tracing performance has recently been achieved even on single CPU. [Wald et al. 2001, 2002, 2004] However, higher resolutions, complex

More information

NVFX : A NEW SCENE AND MATERIAL EFFECT FRAMEWORK FOR OPENGL AND DIRECTX. TRISTAN LORACH Senior Devtech Engineer SIGGRAPH 2013

NVFX : A NEW SCENE AND MATERIAL EFFECT FRAMEWORK FOR OPENGL AND DIRECTX. TRISTAN LORACH Senior Devtech Engineer SIGGRAPH 2013 NVFX : A NEW SCENE AND MATERIAL EFFECT FRAMEWORK FOR OPENGL AND DIRECTX TRISTAN LORACH Senior Devtech Engineer SIGGRAPH 2013 nvfx : Plan What is an Effect New Approach and new ideas of nvfx Examples Walkthrough

More information

A Short Introduction to Computer Graphics

A Short Introduction to Computer Graphics A Short Introduction to Computer Graphics Frédo Durand MIT Laboratory for Computer Science 1 Introduction Chapter I: Basics Although computer graphics is a vast field that encompasses almost any graphical

More information

Overview Motivation and applications Challenges. Dynamic Volume Computation and Visualization on the GPU. GPU feature requests Conclusions

Overview Motivation and applications Challenges. Dynamic Volume Computation and Visualization on the GPU. GPU feature requests Conclusions Module 4: Beyond Static Scalar Fields Dynamic Volume Computation and Visualization on the GPU Visualization and Computer Graphics Group University of California, Davis Overview Motivation and applications

More information

Programmable Graphics Hardware

Programmable Graphics Hardware Programmable Graphics Hardware Alessandro Martinelli alessandro.martinelli@unipv.it 6 November 2011 Rendering Pipeline (6): Programmable Graphics Hardware Rendering Architecture First Rendering Pipeline

More information

2 SYSTEM DESCRIPTION TECHNIQUES

2 SYSTEM DESCRIPTION TECHNIQUES 2 SYSTEM DESCRIPTION TECHNIQUES 2.1 INTRODUCTION Graphical representation of any process is always better and more meaningful than its representation in words. Moreover, it is very difficult to arrange

More information

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 14, 2011 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

Comp 410/510. Computer Graphics Spring 2016. Introduction to Graphics Systems

Comp 410/510. Computer Graphics Spring 2016. Introduction to Graphics Systems Comp 410/510 Computer Graphics Spring 2016 Introduction to Graphics Systems Computer Graphics Computer graphics deals with all aspects of creating images with a computer Hardware (PC with graphics card)

More information

FLOATING-POINT ARITHMETIC IN AMD PROCESSORS MICHAEL SCHULTE AMD RESEARCH JUNE 2015

FLOATING-POINT ARITHMETIC IN AMD PROCESSORS MICHAEL SCHULTE AMD RESEARCH JUNE 2015 FLOATING-POINT ARITHMETIC IN AMD PROCESSORS MICHAEL SCHULTE AMD RESEARCH JUNE 2015 AGENDA The Kaveri Accelerated Processing Unit (APU) The Graphics Core Next Architecture and its Floating-Point Arithmetic

More information

Color correction in 3D environments Nicholas Blackhawk

Color correction in 3D environments Nicholas Blackhawk Color correction in 3D environments Nicholas Blackhawk Abstract In 3D display technologies, as reviewers will say, color quality is often a factor. Depending on the type of display, either professional

More information

1 Abstract Data Types Information Hiding

1 Abstract Data Types Information Hiding 1 1 Abstract Data Types Information Hiding 1.1 Data Types Data types are an integral part of every programming language. ANSI-C has int, double and char to name just a few. Programmers are rarely content

More information

Computer Graphics on Mobile Devices VL SS2010 3.0 ECTS

Computer Graphics on Mobile Devices VL SS2010 3.0 ECTS Computer Graphics on Mobile Devices VL SS2010 3.0 ECTS Peter Rautek Rückblick Motivation Vorbesprechung Spiel VL Framework Ablauf Android Basics Android Specifics Activity, Layouts, Service, Intent, Permission,

More information