Jump to content

Geometry shader

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by EvanED (talk | contribs) at 17:00, 29 January 2008 (Function: Cleaning up wording). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Geometry shader (abbreviation GS) is a shader program, normally executed on the graphics processing unit.

Function

A geometry shader can generate new graphics primitives, such as pixels, lines, and triangles, from those primitives that were sent to the beginning of the graphics pipeline.

Geometry shader programs are executed after vertex shaders. They take as input a whole primitive, possibly with adjacency information. For example, when operating on triangles, the three vertices are the geometry shader's input. The shader can then emit zero or more primitives, which are rasterized and their fragments ultimately passed to a pixel shader.

Typical uses of a geometry shader include point sprite generation, geometry tessellation, shadow volume extrusion, and single pass rendering to a cube map.

Programming

Geometry shaders are programmed in the following languages: Assembly, Cg and HLSL. GLSL does not yet support geometry shaders, but it is expected that the next version of OpenGL will support. Although OpenGL does not support Geometry Shaders in its core functionality extensions are now available te enable GLSL as programming language for Geometry Shaders.

See also

References