Arb-glsl workgroup Update Bill Licea-Kane ATI Research, Inc.

Slides:



Advertisements
Similar presentations
Two-Dimensional Arrays Chapter What is a two-dimensional array? A two-dimensional array has “rows” and “columns,” and can be thought of as a series.
Advertisements

EECS 700: Computer Modeling, Simulation, and Visualization Dr. Shontz Chapter 2: Shader Fundamentals (continued)
C++ Features and Constructs Ch. 3 except 3.2, 3.4, 3.9, 3.11.
Informationsteknologi Wednesday, December 12, 2007Computer Graphics - Class 171 Today’s class OpenGL Shading Language.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 5 : GLSL Shaders Topics: Shader syntax, passing textures into shaders, per-pixel lighting,
GLSL I May 28, 2007 (Adapted from Ed Angel’s lecture slides)
GLSL I Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico.
1 Chapter 6 Inheritance, Interfaces, and Abstract Classes.
Cg: C for Graphics Jon Moon Based on slides by Eugene Lee.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
1 Type Type system for a programming language = –set of types AND – rules that specify how a typed program is allowed to behave Why? –to generate better.
Mohan Sridharan Based on slides created by Edward Angel GLSL I 1 CS4395: Computer Graphics.
Cg Overview Cg is the High Level language from NVIDIA for programming GPUs, developed in close collaboration with Microsoft Cg is 100% compatible with.
Computer Science 1620 Lifetime & Scope. Variable Lifetime a variable's lifetime is finite Variable creation: memory is allocated to the variable occurs.
Image Processing.  a typical image is simply a 2D array of color or gray values  i.e., a texture  image processing takes as input an image and outputs.
Real-time Graphical Shader Programming with Cg (HLSL)
An Introduction to the OpenGL Shading Language Benj Lipchak Rob Simpson Bill Licea-Kane.
CIS 565 Fall 2011 Qing Sun
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
© Copyright Khronos Group, Page 1 Shaders Go Mobile: An Introduction to OpenGL ES 2.0 Tom Olson, Texas Instruments Inc.
Lecture by: Martin Deschamps CSE 4431
CS212: Object Oriented Analysis and Design Lecture 9: Function Overloading in C++
OpenGL Shader Language Vertex and Fragment Shading Programs.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS212: Object Oriented Analysis and Design
Shaders in OpenGL Marshall Hahn. Introduction to Shaders in OpenGL In this talk, the basics of OpenGL Shading Language will be covered. This includes.
OpenGL Shading Language (GLSL)
OpenGL Shading Language (GLSL)
Week 3 Lecture 4: Part 2: GLSL I Based on Interactive Computer Graphics (Angel) - Chapter 9.
Structuring Data: Arrays ANSI-C. Representing multiple homogenous data Problem: Input: Desired output:
 Learn how you can use the shader through OpenGL ES  Add texture on object and make the object have a different look!!
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
 Learn some important functions and process in OpenGL ES  Draw some triangles on the screen  Do some transformation on each triangle in each frame.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Data Types (3) 1 Programming Languages – Principles and Practice by Kenneth C Louden.
CS 4363/6353 SHADERS/GLSL. ANOTHER LOOK AT THE PIPELINE Vertex Processing Clipping/Assembly Rasterization Fragment Processing.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
OpenGL Shading Language
Chapter 1 C++ Basics Review (Section 1.4). Classes Defines the organization of a data user-defined type. Members can be  Data  Functions/Methods Information.
Chapter 4: More Object Concepts. Objectives Understand blocks and scope Overload a method Avoid ambiguity Create and call constructors with parameters.
Programming with OpenGL Part 3: Shaders Ed Angel Professor of Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive.
OpenGl Shaders Lighthouse3d.com.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
Notes Over 4.2 Finding the Product of Two Matrices Find the product. If it is not defined, state the reason. To multiply matrices, the number of columns.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
Shader.
CSE 381 – Advanced Game Programming GLSL Syntax
Introduction to Computer Graphics with WebGL
GLSL I Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico.
Multiplying Matrices.
Conversions of the type of the value of an expression
Introduction to Computer Graphics with WebGL
Scope, Visibility, and Lifetime
UMBC Graphics for Games
Chapter VI OpenGL ES and Shader
Multiplying Matrices.
Introduction to Computer Graphics with WebGL
Multidimensional array
Multiplying Matrices.
Programming with OpenGL Part 3: Shaders
Hw03 : shader.
CS 480/680 Computer Graphics GLSL Overview.
Language Definitions Chap. 3 of Orange Book.
Multiplying Matrices.
CS 480/680 Part 1: Model Loading.
Multiplying Matrices.
Introduction to Computer Graphics with WebGL
Multiplying Matrices.
CS 480/680 Fall 2011 Dr. Frederick C Harris, Jr. Computer Graphics
Presentation transcript:

arb-glsl workgroup Update Bill Licea-Kane ATI Research, Inc.

arb-glsl workgroup OpenGL Shading Language OpenGL Shading Language OpenGL ES Shading Language –EVOLVING TOGETHER IN PARALLEL

arb-glsl workgroup OpenGL Shading Language #version 120 Can link shaders with mixed versions Special Variables Qualifiers Minor changes (some backward incompatible) –Names –Function Signatures –Arrays –Matrices ARB_texture_shader_lod

arb-glsl workgroup OpenGL Shading Language built-in fragment special variables –Based on OpenGL ES 2.0 –Values are undefined if GL_POINT_SPRITE disabled gl_PointCoord;

qualifier vec4 centroid varying Texcoord; arb-glsl workgroup OpenGL Shading Language

Names – slight changes from #version 110 –C++ like –Names hide names of all types Functions, Variables, Structures –Can declare names within a scope Exception – local functions declarations disallowed Exception – can not redeclare within a scope –Built-in functions in “outermost scope” A local name hides *ALL* outer names

arb-glsl workgroup OpenGL Shading Language Example #version 120 //... vec4 texture2D( sampler2D s, vec4 P ) { return vec4( 1.0, 0.0, 1.0, 1.0 ); } //... vec4 texture2D = texture2D( tex0, P.st );

arb-glsl workgroup OpenGL Shading Language Signature matching First try to find an exact match Else try limited implicit constructors: –int  float –ivec2  vec2 –ivec3  vec3 –ivec4  vec4 If multiple implicit matches, error

arb-glsl workgroup OpenGL Shading Language Arrays –Now first class –==, !=, = (but must have explicit size) –Array constructors float[7]( 0.0,1.0,2.0,3.0,4.0,5.0,6.0 ) float[]( 0.0,1.0,2.0,3.0,4.0,5.0,6.0 ) float a[] = float[]( 0.0, 1.0, 2.0 );

arb-glsl workgroup OpenGL Shading Language Matrices –non-square permitted mat2x3 // 2 columns by 3 rows outerProduct() transpose() –Additional constructors

arb-glsl workgroup OpenGL Shading Language built-in functions –Based on ATI_shader_texture_lod texture2DLod( sampler2D s, vec2 P, float Lod ); texture2DGradARB( sampler2D s, vec2 P, vec2 dPdx, vec2 dPdy ); texture2DProjGradARB( sampler2D s, vec2 P, vec2 dPdx, vec2 dPdy );

arb-glsl workgroup Pixel grids and area operators