Introduction The realm of shader programming today is dominated by GLSL, but the road to where we are was long and loopy. Shader programs came about as a natural evolution of texture combination, another form of programmability found as late as the Wii (2006). However, texture combination on OpenGL is inherently more limited, from lack of features that cannot be worked around e.g. texture coordinate displacement, whilst extensions such as NV_texture_shader were never pulled in. At a point, texture combination was left behind. In 2001 EXT_vertex_shader and ATI_fragment_shader were released, allowing the user to insert shader operations one by one with functions such as glShaderOp...EXT and glColorFragmentOp...ATI. Mesa supports the latter, yet not the former — seemingly inconsistent, when you consider the usual stance on such issues. The two had little time in the sun, as the Architecture Review Board slammed down ARB_vertex_program and ARB_fragment_program, sealing the paradigm from then on: send all instructions at once in a textual form. This marked the beginning of what is termed ARB assembly. This article is thanks to my dissatisfaction with introductory ARB assembly literature. Writing this required filling in many blanks, so I can't guarantee correctness. Always read the specs! Integration Unlike GLSL, where vertex and fragment shaders are separately compiled then linked together, ARB shaders are actually separate programs coming in separate extensions: ARB_vertex_program and ARB_fragment_program. It is possible for an OpenGL implementation to provide both, one or neither. Additionally, it is possible — and has happened — that an implementation supports one in hardware, and simulates another in software. Like a GLSL shader, an ARB program replaces its corresponding part of the fixed-function pipeline. Thus replacing, say, the vertex program, means you lose the built-in Gouraud shading that may be available in silicon, and you will have to implement it manually...
First seen: 2025-05-15 17:40
Last seen: 2025-05-15 18:40