Jump to content

Geometry shader

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by NeARAZ (talk | contribs) at 13:19, 10 March 2007. 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 excecuted on the Graphics processing unit.

Function

A geometry shader can generate new primitives from existing primitives like pixels, lines and triangles.

Geometry shader is executed after Vertex shader and it's input is the whole primitive or primitive with adjacency information. For example, when operating on triangles, three vertices are geometry shader's input. Geometry shader can then emit zero or more primives, which are rasterized and their fragments ultimately passed to Pixel shader.

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

Programming

Geometry shaders are programmed in the following languages: Assembler, HLSL, GLSL.

Further reading

References