Geometry shader
DirectX 10s Geometry Shader
DirectX 10 will introduce a new shader in to the mix called the geometry shader. This shader is pretty big news considering what it can be used for. The geometry shader sits right in between the vertex shader and the pixel shader in the Direct3D10 graphics pipeline (although its conceivable that results from the geometry shader can be sent back to the vertex shader, and then back to the geometry shader, as there are no restrictions in sending the results from one shader type to another).
After the vertices are processed by the vertex shader, the geometry shader can be used to perform further work on them. The geometry shader can be used to amplify the number of triangles, so it can take the vertices and create a new set of triangles. One limitation of the vertex shader is that it cant create new vertices. The geometry shader can even be used to work on the edges of a triangle to create a different shape.
In essence, the geometry shader allows for the scene being created to fully utilize all geometry primitives which include: lines, points, and triangles. Additionally, it can handle adjacent primitives. In the past, these primitives were handled in different areas of the pipeline and exclusively in those areas. What does that mean? Well, think about a triangle and its shape. The geometry shader can take full control of the triangle and control its vertices, treating it like an object before it is passed to the rasterizer and pixel shader for further processing.
The geometry shader will open up a slew of possibilities for developers in regards to creating new, more elaborate effects in DirectX 10 games, or enhancing performance: from working concurrently with the pixel shader and the vertex shader, or offloading CPU cycles to the GPU, its a huge breakthrough.
Here are some of the cool new effects that we could see from the geometry shader. They include:
Animating organic forms (one demo Microsoft has demonstrated in the past had dynamically growing vines rendered 100% on the GPU)
Geometry/data amplification
Motions Blur
More realistic wrinkles on faces
Realistic Shadow Volume Generation
Modeling fluid-like behavior in games (particle systems which model fluids)
Cartoon and Falloff Effects
Stencil Shadow Extrusion
Procedural geometry and detailing
Add noise to create turbulent fields
Displacement Mapping
Isosurface extraction
And many more possibilities!