- ARB (GPU assembly language)
ARB - OpenGL Assembly Language is a low-level
shading language. It was created by the OpenGL ARBto standardize GPUinstructions controlling the hardware graphics pipeline.
Texas Instrumentscreated the first programmable graphics processorin 1985: the TMS34010, which allowed developers to load and execute code on the processor to control pixeloutput on a video display. This was followed by the TMS34020 and TMS34082 in 1989, providing programmable 3D graphics output. NVIDIAreleased its first video card NV1in 1995, which supported quadratic texture mapping. This was followed by the Riva 128(NV3) in 1997, providing the first hardware accelation for Direct3D.
Various video card vendors released their own accelerated boards, each with their own instruction set for
GPUoperations. The OpenGL Architecture Review Board(ARB) was formed in 1992, in part to establish standards for the GPUindustry.
The ARB and
NVIDIAestablished a number of OpenGLextensions to standardize GPU programming [ cite web | url = http://download.nvidia.com/developer/presentations/2004/6800_Leagues/6800_Leagues_OpenGL_exts.pdf | title = History of Programmability in OpenGL | author = Simon Green ] :
* EXT_texture_env_combine - provided a programmable method of combining textures.
* NV_register_combiners - GeForce 256
* NV_vertex_program - GeForce 3
* NV_texture_shader - GeForce 3
* NV_texture_shader3 - GeForce 4
* NV_vertex_program2 - GeForce FX
* NV_fragment_program - GeForce FX
This culminated with ARB's 2002 release of
* ARB_vertex_program [ cite web | url = http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_program.txt | title = ARB_vertex_program | author = ARB ]
* ARB_fragment_program [ cite web | url = http://oss.sgi.com/projects/ogl-sample/registry/ARB/fragment_program.txt | title = ARB_fragment_program | author = ARB ]
These two extensions provided an industry standard for an assembly language that controlled the
GPUpipeline for 3D vertex and interpolated pixel properties, respectively.
Shading languages compile to this ARB standard. While 3D developers are now more likely to use a C-like, high-level Shading languagefor GPUprogramming, ARB assembly has the advantage of being supported on a wide range of hardware.
The ARB Vertex Program extension provides APIs to load ARBvp1.0 assembly instructions, enable selected programs, and to set various GPU parameters.
Vertex programs are used to modify vertex properties, such as position, normals and texture coordinates, that are passed to the next pipeline process: often a fragment shader; more recently, a geometry shader.
The ARB Fragment Program extension provides APIs to load ARBfp1.0 assembly instructions, enable selected programs, and to set various GPU parameters.
OpenGLfragments are interpolated pixel definitions. The GPU's vertex processor calculates all the pixels controlled by a set of vertices, interpolates their position and other properties and passes them onto its fragment process. Fragment programs allow developers to modify these pixel properties before they are rendered to a frame buffer for display.
* Attrib parameters are per-vertex attributes such as vertex normals.
* Local parameters are applied across a program's entire data set for a given shader pass.
* Env parameters are applied across all programs.
All ARB assembly variables are float4 vectors, which may be addressed by xyzw or rgba suffixes.
ARB registers are scalar variables were only one element may be addressed.
* ADDRESS variables are registers.
* ATTRIB are per-vertex attributes.
* PARAM are uniform properties - constants, Env or Local.
* TEMP temporary variables.
* ALIAS provides alternate names for variables.
* OUTPUT designates variables that are passed back to the pipeline.
ARB assembly supports the following suffixes for vertex attributes:
ARB assembly supports the following state matrices:
The following modifiers may be used:
ARB Assembly Instructions
ARB supports the following instructions:
* ABS - absolute value
* ADD - add
* ARL - address register load
* DP3 - 3-component
* DP4 - 4-component
* DPH - homgeneous
* DST - distance vector
* EX2 - exponential base 2
* EX2 - exponential base 2 (approximate)
* FLR - floor
* FRC - fraction
* LG2 - logarithm base 2
* LIT - compute light coefficients
* LOG - logarithm base 2 (approximate)
* MAD - multiply and add
* MAX - maximum
* MIN - minimum
* MOV - move
* MUL - multiply
* POW - exponentiate
* RCP - reciprocal
* RSQ -
reciprocal square root
* SGE - set on greater than or equal
* SLT - set on less than
* SUB - subtract
* SWZ - extended swizzle
* XPD -
ARB assembly provides no instructions for flow control or branching. SGE and SLT may be used to conditionally set or clear vectors or registers.
ARB interfaces provide no compiling step for assembly language.
A sample trivial ARB Vertex Shader
!!ARBvp1.0TEMP vertexClip;DP4 vertexClip.x, state.matrix.mvp.row  , vertex.position;DP4 vertexClip.y, state.matrix.mvp.row  , vertex.position;DP4 vertexClip.z, state.matrix.mvp.row  , vertex.position;DP4 vertexClip.w, state.matrix.mvp.row  , vertex.position;MOV result.position, vertexClip;MOV result.color, vertex.color;MOV result.texcoord  , vertex.texcoord;END
A sample trivial ARB Fragment Shader
!!ARBfp1.0TEMP color;MUL color, fragment.texcoord  .y, 2.0;ADD color, 1.0, -color;ABS color, color;ADD result.color, 1.0, -color;MOV result.color.a, 1.0;END
OpenGL Architecture Review Board
* Shader Languages
* Assembly Languages
Wikimedia Foundation. 2010.
Look at other dictionaries:
Shading language — A shading language is a special programming language adapted to easily map on shader programming. Those kind of languages usually have special data types like color and normal. Because of the various target markets of 3D graphics, different… … Wikipedia
OpenGL — Original author(s) Silicon Graphics Developer(s) Khronos Group Stable release 4.2 … Wikipedia
GLSL — OpenGL Shading Language (abbreviated: GLSL or GLslang), is a high level shading language based on the syntax of the C programming language. It was created by the OpenGL ARB to give developers more direct control of the graphics pipeline without… … Wikipedia
OpenGL Architecture Review Board — The OpenGL Architecture Review Board (ARB) is an industry consortium that governed the OpenGL specification. It was formed in 1992, and defined the conformance tests, approved the OpenGL specification and advanced the standard. On July 31, 2006,… … Wikipedia
OpenGL Architecture Review Board — L OpenGL Architecture Review Board (ARB) est un consortium qui encadre les spécifications d OpenGL. Il a été formé en 1992 et défini les tests de conformité pour valider les spécifications d OpenGL et continue de mettre à jour les standards. Le… … Wikipédia en Français
Comparison of OpenGL and Direct3D — Direct3D and OpenGL are competing application programming interfaces (APIs) which can be used in applications to render 2D and 3D computer graphics, taking advantage of hardware acceleration when available. Modern graphics processing unit (GPUs)… … Wikipedia
Perl OpenGL — Infobox Software name = Perl OpenGL caption = A screenshot illustrating FBO and Vertex/Fragment program extensions via POGL developer = Stan Melax, Kenneth Albanowski, Ilya Zakharevich, Jean Louis Morel, Bob Free latest release version = 0.57… … Wikipedia