1 / 14

arb-glsl workgroup Update

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

tory
Download Presentation

arb-glsl workgroup Update

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. arb-glsl workgroupUpdate Bill Licea-Kane ATI Research, Inc.

  2. arb-glsl workgroupOpenGL Shading Language • OpenGL Shading Language • OpenGL ES Shading Language • EVOLVING TOGETHER IN PARALLEL

  3. arb-glsl workgroupOpenGL 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

  4. arb-glsl workgroupOpenGL Shading Language • built-in fragment special variables • Based on OpenGL ES 2.0 • Values are undefined if GL_POINT_SPRITE disabled gl_PointCoord;

  5. arb-glsl workgroupOpenGL Shading Language • qualifier vec4 centroid varying Texcoord;

  6. arb-glsl workgroupOpenGL 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

  7. arb-glsl workgroupOpenGL 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 );

  8. arb-glsl workgroupOpenGL 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

  9. arb-glsl workgroupOpenGL 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 );

  10. arb-glsl workgroupOpenGL Shading Language • Matrices • non-square permitted mat2x3 // 2 columns by 3 rows outerProduct() transpose() • Additional constructors

  11. arb-glsl workgroupOpenGL 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 );

  12. arb-glsl workgroupPixel grids and area operators

More Related