Search the web

Google
 

Thursday, April 26, 2007

Geometry Shaders

What are Geometry shaders?
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.




• Input
- Standard primitives- point, line, triangle...
- New primitive types include neighboring vertices
- Line with adjacencyPrimitive Assembly



- Triangle with adjacency





• Output
- Unique output type (independent from input type)- Points, line strips or triangle strips
- Can output zero or more primitives- Generated primitive stream is in the same order as inputted
6Clipping & Rasterization

No comments: