Example: air traffic controller

The OpenGL Shading Language 4 - Khronos Group

The OpenGL Shading LanguageLanguage Version: Revision: 709-May-2017 Editor: John Kessenich, GoogleVersion Authors: John Kessenich, Dave Baldwin, Randi RostCopyright (c) 2008-2017 The Khronos Group Inc. All Rights specification is protected by copyright laws and contains material proprietary to the Khronos Group , Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group . You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification , but the receipt orpossession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible.

number, the language accepted is a previous version of the shading language, which will be supported depending on the version and type of context in the OpenGL API. See the OpenGL Graphics System Specification, Version 4.5, for details on …

Tags:

  Language, Specification, Shading, Opengl, Opengl shading language, Shading language

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of The OpenGL Shading Language 4 - Khronos Group

1 The OpenGL Shading LanguageLanguage Version: Revision: 709-May-2017 Editor: John Kessenich, GoogleVersion Authors: John Kessenich, Dave Baldwin, Randi RostCopyright (c) 2008-2017 The Khronos Group Inc. All Rights specification is protected by copyright laws and contains material proprietary to the Khronos Group , Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group . You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification , but the receipt orpossession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible.

2 Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification Group makes no, and expressly disclaims any, representations or warranties, express or implied, regarding this specification , including, without limitation, any implied warranties of merchantabilityor fitness for a particular purpose or noninfringement of any intellectual property. Khronos Group makes no, and expressly disclaims any, warranties, express or implied, regarding the correctness, accuracy, completeness, timeliness, and reliability of the specification . Under no circumstances willthe Khronos Group , or any of its Promoters, Contributors or Members or their respective partners, officers, directors, employees, agents, or representatives be liable for any damages, whether direct, indirect, special or consequential damages for lost revenues, lost profits, or otherwise, arising from or in connection with these , SYCL, SPIR, WebGL, EGL, COLLADA, StreamInput, OpenVX, OpenKCam, glTF, OpenKODE, OpenVG, OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL and OpenMAX DL are trademarks and WebCL is a certification mark of the Khronos Group Inc.

3 OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks and the OpenGL ES and OpenGL SC logos aretrademarks of Silicon Graphics International used under license by Khronos . All other product names, trademarks, and/or company names are used solely for identification and belong to their respective of Contents1 Changes from Revision 6 of GLSL Version Changes from Revision 5 of GLSL Version Changes from Revision 3 of GLSL Version Summary of Changes from Revision 9 of GLSL Version Error Typographical Overview of OpenGL Vertex Tessellation Control Tessellation Evaluation Geometry Fragment Compute Character Set and Phases of Source Static Dynamically Uniform Expressions and Uniform Control Variables and Basic Floating-Point Opaque Atomic Implicit Storage Default Storage Constant Constant Input Uniform Output Buffer Shared Interface Layout Input Layout Tessellation Evaluation Geometry Shader Fragment Shader Compute Shader Output Layout Transform Feedback Layout Tessellation Control Geometry

4 Fragment Uniform Variable Layout Subroutine Function Layout Uniform and Shader Storage Block Layout Opaque-Uniform Layout Atomic Counter Layout Format Layout Interpolation Redeclaring Built-in Interpolation Variables in the Compatibility Parameter Precision and Precision Range and Precision Default Precision Available Precision Variance and the Invariant The Invariant Invariance of Constant The Precise Memory Order and Repetition of Empty Operators and Array Function Conversion and Scalar Vector and Matrix Structure Array Vector and Scalar Components and Matrix Structure and Array Vector and Matrix Out-of-Bounds Statements and Function Function Calling Built-in Built-In Language Compatibility Profile Built-In Language Compatibility Profile Vertex Shader Built-In Built-In Compatibility Profile Built-In Built-In Uniform Compatibility Profile Built-in Angle and Trigonometry Exponential Common Floating-Point Pack and Unpack Geometric Matrix Vector Relational Integer Texture Texture Query Texel Lookup Texture Gather Compatibility Profile Texture Atomic-Counter Atomic Memory Image Fragment Processing Derivative Interpolation Noise Geometry Shader Shader Invocation Control Shader Memory Control Shading Language Grammar for Core Normative IntroductionThis document specifies only version of the OpenGL Shading Language .

5 It requires __VERSION__ to substitute 450, and requires #version to accept only 450. If #version is declared with a smaller number, the Language accepted is a previous version of the Shading Language , which will be supported depending on the version and type of context in the OpenGL API. See the OpenGL Graphics System specification , Version , for details on what Language versions are versions of the OpenGL Shading Language , as well as the OpenGL ES Shading Language , are not strict subsets of the version specified here, particularly with respect to precision, name-hiding rules, and treatment of interface variables. See the specification corresponding to a particular Language version for details specific to that version of the OpenGL Graphics System specification references in this specification are to version 1 specification is based on the work of those who contributed to past versions of the OpenGL Language specification , the OpenGL ES Language specification , and the following contributors to this version.

6 Pat Brown, NVIDIAJeff Bolz, NVIDIAF rank ChenPierre Boudier, AMDP iers Daniell, NVIDIAC hris Dodd, NVIDIANick Haemel, NVIDIAJ ason Green, TransGamingBrent Insko, IntelJon LeechBill Licea-Kane, QualcommDaniel Koch, TransGamingGraeme Leese, BroadcomBarthold Lichtenbelt, NVIDIAB ruce Merry, ARMR obert OhannessianTom Olson, ARMB rian Paul, VMwareAcorn Pooley, NVIDIAD aniel Rakos, AMDC hristophe Riccio, AMDK evin RogovinIan Romanick, IntelGreg Roth, NvidiaGraham Sellers, AMDDave Shreiner, ARMJ eremy Sandmel, AppleRobert Simpson, QualcommEric Werness, NVIDIAMark Young, AMD21 from Revision 6 of GLSL Version Public Bug 1448: Cannot reuse the same binding number, except if the type of resource is different, or for atomic counters if the offset is different. Public Bug 1460: Denormalized 16-bit floats can be flushed to zero when unpacked, but it is preferred that values are preserved. See unpackHalf2x16(). Public Bug 1472: The granularity of "per-patch output" access is component level (32-bit component).

7 GitHub Issue: Include atomic counters as a use of offset in the table in section Layout Qualifiers . Private Bug 16187: Remove run-time from the phrase run-time flow of control . Private Bug 11600: Reduce the set of built-in functions required to evaluate to compile-time constant expressions. See section for an explicit list of what must be a compile-time constant. Private Bug 16140: Remove the following invariant pragma rule: It is a compile-time error to use this pragma in a fragment shader. See section Private Bug 15981: Fix typo in section : layout qualification is not included in parameter matching. Private Bug 15973: Don't allow layout(local_size_* = 0). Private Bug 15951: Don't allow equality comparisons of subroutine uniform variables. Private Bug 16003: Include undefining as well as defining when discussing behavior for reservedand built-in macros in section Private Bug 15500: Remove false claim that texture-lookup results are restricted to the range [0,1].

8 Private Bug 15447: Correct allowed range of xfb_buffer. See section Private Bug 12006: memoryBarrierShared() only works within a compute-shader work Group . Private Bug 16104: Require support for identifiers and macro names of length 1024, and allow longer lengths to also be supported. Private Bug 15761: Be more clear that flat is needed for types containing types that need flat qualification. See section Private Bug 15761: Be clear that precise is inherited, applying recursively to structure members. Private Bug 15945: Don't allow unsized arrays of atomic_uint. See section Private Bug 13549: Use the phrase global scope a bit more precisely in several places. Private Bug 16130: Explicitly state that shared variables must be at global Introduction Private Bug 15937: Simplify Language in textureGatherOffsets to just say offsets require constant expressions. Private Bug 8944: Be clear the selection/switch grammar in section is expository, not normative. Also case and default can only occur in a switch statement.

9 Private Bug 15678: Don t allow location = on block members where the block needs an array of from Revision 5 of GLSL Version Updated copyright and license page. Bug 1293 restrict subroutine use to just the places needed. Bug 1294 define and use aggregate consistently. Bug 1310 large set of typographical changes (non-functional, not marked) Bug 1315 for arrays of arrays of block instances, each element gets a binding point Bug 1447 correct the pow() inheritance formula. Bug 1405 allow mixed int/uint types in bitwise operations. Bug 1461 align values must be greater than 0 (align = 0 is a compile-time error). Bug 1247 Component limits for arrayed interfaces ( , gl_MaxTessControlInputComponents) are limits per vertex, not limits for the entire interface. Bug 14863 Be clear that global non-const declarations can call user functions. Bug 14958 clarify in expository grammar for blocks that memory qualifiers can be used (as is normal, the grammars shown outside section 9 are expository, not normative).

10 Bug 1321 and bug 15276 move to SPIR-V's improved definitions for uniform control flow and dynamically uniform. Bug 15327 layout(invocations = 0) is a compile-time from Revision 3 of GLSL Version Bug 12664: The memory qualifier restrict can be added or removed when passing an argument into function's formal parameter qualification. The memory qualifier coherent was removed to the atomic and image-atomic built-in functions. For all affected built-in functions, the code generated is based on the actual qualification of the calling argument, not on the specified list on the formal parameter in the prototype. Bug 12486: Changed must to may in the statement When using OpenGL API entry points toidentify the name of an individual block in an array of blocks, the name string may include an array index. Public Bug 1223: Removed old Language that Location layout qualifiers may not be used on output blocks or output block members . Bug 12574: Fix typo: dFdxFine(dFdxFine(x)) dFdxFine(dFdyFine(x)).


Related search queries