Example: stock market

The OpenGL® Shading Language, Version 4.60

The opengl Shading Language, Version Kessenich, Google (Editor and Author) ; Dave Baldwin and Randi Rost( Version Authors) Version , Wed, 10 Jul 2019 20:43:00 +0000 Table of Contents1. Introduction.. Changes.. Overview.. Error Handling.. Typographical Conventions.. Deprecation.. 52. Overview of Shading .. Vertex Processor.. Tessellation Control Processor.. Tessellation Evaluation Processor.. Geometry Processor.. Fragment Processor.. Compute Processor.. 73. Basics.. Character Set and Phases of Compilation.. Source Strings.. Preprocessor.. Comments.. Tokens.. Keywords.. Identifiers.. Definitions.. 214. Variables and Types.. Basic Types.. Scoping.. Storage Qualifiers.. Layout Qualifiers.. Interpolation Qualifiers.. Parameter Qualifiers.. Precision and Precision Qualifiers.. Variance and the Invariant Qualifier.. The Precise Qualifier.. Memory Qualifiers.

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 API. See the normative references for details on what language versions are supported. Previous versions of the OpenGL Shading Language, as well as the OpenGL ES Shading Language,

Tags:

  Language, Shading, Opengl, Opengl es shading language, 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, Version 4.60

1 The opengl Shading Language, Version Kessenich, Google (Editor and Author) ; Dave Baldwin and Randi Rost( Version Authors) Version , Wed, 10 Jul 2019 20:43:00 +0000 Table of Contents1. Introduction.. Changes.. Overview.. Error Handling.. Typographical Conventions.. Deprecation.. 52. Overview of Shading .. Vertex Processor.. Tessellation Control Processor.. Tessellation Evaluation Processor.. Geometry Processor.. Fragment Processor.. Compute Processor.. 73. Basics.. Character Set and Phases of Compilation.. Source Strings.. Preprocessor.. Comments.. Tokens.. Keywords.. Identifiers.. Definitions.. 214. Variables and Types.. Basic Types.. Scoping.. Storage Qualifiers.. Layout Qualifiers.. Interpolation Qualifiers.. Parameter Qualifiers.. Precision and Precision Qualifiers.. Variance and the Invariant Qualifier.. The Precise Qualifier.. Memory Qualifiers.

2 Specialization-Constant Qualifier.. Order and Repetition of Qualification.. Empty Declarations.. 1105. Operators and Expressions.. Operators.. Array Operations.. Function Calls.. Constructors.. Vector and Scalar Components and Length.. Matrix Components.. Structure and Array Operations.. Assignments.. Expressions.. Vector and Matrix Operations.. Out-of-Bounds Accesses.. Specialization-Constant Operations.. 1266. Statements and Structure.. Function Definitions.. Selection.. Iteration.. Jumps.. 1367. Built-In Variables.. Built-In language Variables.. Compatibility Profile Vertex Shader Built-In Inputs.. Built-In Constants.. Built-In Uniform State.. Redeclaring Built-In Blocks.. 1578. Built-In Functions.. Angle and Trigonometry Functions.. Exponential Functions.. Common Functions.. Floating-Point Pack and Unpack Functions.. Geometric Functions.

3 Matrix Functions.. Vector Relational Functions.. Integer Functions.. Texture Functions.. Atomic Counter Functions.. Atomic Memory Functions.. Image Functions.. Geometry Shader Functions.. Fragment Processing Functions.. Noise Functions.. Shader Invocation Control Functions.. Shader Memory Control Functions.. Subpass-Input Functions.. Shader Invocation Group Functions.. 2039. Shading language Grammar.. 20510. Acknowledgments.. 21811. Normative References.. 21912. Non-Normative SPIR-V Mappings.. Feature Comparisons.. Mapping from GLSL to SPIR-V.. 221 Copyright 2008-2018 The Khronos Group Inc. All Rights specification is protected by copyright laws and contains material proprietary to the KhronosGroup, Inc. It or any components may not be reproduced, republished, distributed, transmitted,displayed, broadcast, or otherwise exploited in any manner without the express prior writtenpermission of Khronos Group.

4 You may use this specification for implementing the functionalitytherein, without altering or removing any trademark, copyright or other notice from thespecification, but the receipt or possession of this specification does not convey any rights toreproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it maydescribe, in whole or in Group grants express permission to any current Promoter, Contributor or Adoptermember of Khronos to copy and redistribute UNMODIFIED versions of this specification in anyfashion, provided that NO CHARGE is made for the specification and the latest available update ofthe specification for any Version of the API is used whenever possible. Such distributedspecification may be reformatted AS LONG AS the contents of the specification are not changed inany way.

5 The specification may be incorporated into a product that is sold as long as such productincludes significant independent work developed by the seller. A link to the current Version of thisspecification on the Khronos Group website should be included whenever possible withspecification Group makes no, and expressly disclaims any, representations or warranties, express orimplied, regarding this specification, including, without limitation, any implied warranties ofmerchantability or fitness for a particular purpose or noninfringement of any intellectual Group makes no, and expressly disclaims any, warranties, express or implied, regardingthe correctness, accuracy, completeness, timeliness, and reliability of the specification. Under nocircumstances will the Khronos Group, or any of its Promoters, Contributors or Members or theirrespective partners, officers, directors, employees, agents, or representatives be liable for anydamages, whether direct, indirect, special or consequential damages for lost revenues, lost profits,or otherwise, arising from or in connection with these , Vulkan, SYCL, SPIR, WebGL, EGL, COLLADA, StreamInput, OpenVX, OpenKCam, glTF,OpenKODE, OpenVG, OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL and OpenMAXDL are trademarks and WebCL is a certification mark of the Khronos Group Inc.

6 OpenCL is atrademark of Apple Inc. and opengl and OpenML are registered trademarks and the opengl ESand opengl SC logos are trademarks of Silicon Graphics International used under license byKhronos. All other product names, trademarks, and/or company names are used solely foridentification and belong to their respective 1. IntroductionThis document specifies only Version of the opengl Shading language (GLSL). It requires__VERSION__ to substitute 460, and requires # Version to accept only 460. If # Version is declaredwith a smaller number, the language accepted is a previous Version of the Shading language , whichwill be supported depending on the Version and type of context in the API. See the normativereferences 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.

7 See the specification corresponding to aparticular language Version for details specific to that Version of the , when generating SPIR-V for consumption by the Vulkan API (see normativereferences), this will be said to be targeting this specification and the opengl Specification are normative for opengl ShadingLanguage, for SPIR-V generation it is still the SPIR-V specification and the SPIR-V client APIspecification that are normative for the generated SPIR-V. See the normative references for SPIR-V generation, the SPIR-V client API specifies the commands used to manipulate offline tool chains will compile GLSL down to the SPIR-V intermediate language . SPIR-V generation is not enabled with a #extension, # Version , or a profile. Instead, use of GLSL for SPIR-V is determined by offline tool-chain use. See the documentation of such tools to see how to requestgeneration of SPIR-V for its client SPIR-V compilers must be directed as to what SPIR-V Capabilities are legal at run-time andgive errors for GLSL feature use outside those capabilities.

8 This is also true for implementation-dependent limits that can be error checked by the front-end against built-in constants present inthe GLSL source: the front-end can be informed of such limits, and report errors when they features that are not controlled by a SPIR-V capability, but do have an equivalent GLSL counterpart (stages, built-in functions, types, limits, etc.) are only expected to work on OpenGLdrivers that support the GLSL references in this specification to the opengl Specification are to the Core profile of Version ,unless a different profile is Changes from Revision 6 of GLSL Incorporated the GL_KHR_vulkan_glsl specification. Add note in the introduction about presence in drivers of SPIR-V features, as they relate to GLSL2features. Clarify it is same location that triggers default-uniform block matching rules. See UniformVariable Layout Changes from Revision 5 of GLSL Private GLSL issue #34: Clarify/consolidate implicit conversion rules from int uint to be thesame as explicit construction.

9 Private GLSL issue #24: Clarify that barrier() by itself is enough to synchronize both controlflow and memory accesses to shared variables and tessellation control output variables. Forother memory accesses an additional memory barrier is still required. Normatively reference IEEE-754 for definitions of floating-point formats. Private GLSL issue 36: refract function on double types requires eta argument to have typedouble. Clarify restrictions on input variables in tessellation and geometry stages. Private GLSL issue 15: Clarify the ordering of bindings for arrays of arrays. Private GLSL issue 14: Uniform variables need only match at link time if they are statically used. For precise computations, the controlling expressions for control flow and ternary operators (?:) are not Changes from Revision 4 of GLSL Private bug 13012: Clarified that builtin uniform variables might only be available in thefragment stage.

10 Private bug 13837: Ternary and sequence operators may operate on void types. Clarified that errors arising from preprocessing must be returned at compile time. Clarified that access to any part of a variable constitutes a static use. Private GLSL issue 19: A statement is required following any label at the end of a switch. Private GLSL issue 26: noise is not valid when compiling for SPIR-V. Private GLSL issue 20: length() expressions returning a constant value may not contain sideeffects. Public opengl -API issue 7: Variables can be declared as both readonly and writeonly. Private GLSL issue 16: Use of constant expressions within #line directives is undefined. Corrected return type of imageAtomicExchange on float images. Private GLSL issue 32: Remove length() method contradiction: Non runtime-sized arrays onlysupport length() on explicitly sized arrays. Private GLSL issue 21: Clarified the l-value restriction on interpolateAt.


Related search queries