Geometry shader
From Wikipedia, the free encyclopedia
Geometry shader (abbreviation GS) is a shader program, normally excecuted on the Graphics processing unit.
Contents |
[edit] Function
A geometry shader can generate new primitives from existing primitives like pixels, lines and triangles.
Geometry shader is executed after Vertex shader and its 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 tessellation, shadow volume extrusion, single pass rendering to a cube map.
[edit] Programming
Geometry shaders are programmed in the following languages: Assembler, HLSL, GLSL.