Difference between revisions of "Vertex Processing"

From OpenGL.org
Jump to: navigation, search
(Page for shader-based vertex processing operations.)
 
m (Tessellation)
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{pipeline float}}
 
'''Vertex Processing''' is the stage of the OpenGL rendering pipeline where [[Vertex Specification|a sequence of vertices]] are processed via a series of [[Shader]]s.
 
'''Vertex Processing''' is the stage of the OpenGL rendering pipeline where [[Vertex Specification|a sequence of vertices]] are processed via a series of [[Shader]]s.
  
 
== Vertex Shader ==
 
== Vertex Shader ==
 
{{main|Vertex Shader}}
 
{{main|Vertex Shader}}
 +
 +
The vertex shader is the [[Shader|programmable stage]] in the rendering pipeline that handles the processing of individual vertices. A vertex shader receives a single vertex composed of a series of Vertex Attributes. This input vertex is processed arbitrarily to produce an output vertex. There must be a 1:1 mapping from input vertices to output vertices.
  
 
== Tessellation ==
 
== Tessellation ==
 
{{main|Tessellation}}
 
{{main|Tessellation}}
 +
 +
This stage takes the vertices output from the previous stage, pulls them into primitives, and tessellates those primitives based on shader logic and a fixed-function tessellation system. It is optional; if no tessellation shaders are present and no tessellation operations are invoked, then the outputs from the vertex shader are passed to the next stage.
  
 
== Geometry Shader ==
 
== Geometry Shader ==
 
{{main|Geometry Shader}}
 
{{main|Geometry Shader}}
  
{{stub}}
+
A geometry shader (GS) is a [[Shader]] program that governs the processing of primitives. A GS can create new primitives, unlike [[Vertex Shader|vertex shaders]], which are limited to a 1:1 input to output ratio. A GS can also perform layered rendering, where different primitives can be rendered to different attached layered images.
 +
 
 +
The GS is optional; if it is not present, primitives passed from prior stages are given to the [[Vertex Post-Processing|next stage]] directly.
  
 
[[Category:General OpenGL]]
 
[[Category:General OpenGL]]
 
[[Category:Vertex Processing]]
 
[[Category:Vertex Processing]]

Revision as of 02:57, 3 November 2012

Vertex Processing is the stage of the OpenGL rendering pipeline where a sequence of vertices are processed via a series of Shaders.

Vertex Shader

The vertex shader is the programmable stage in the rendering pipeline that handles the processing of individual vertices. A vertex shader receives a single vertex composed of a series of Vertex Attributes. This input vertex is processed arbitrarily to produce an output vertex. There must be a 1:1 mapping from input vertices to output vertices.

Tessellation

This stage takes the vertices output from the previous stage, pulls them into primitives, and tessellates those primitives based on shader logic and a fixed-function tessellation system. It is optional; if no tessellation shaders are present and no tessellation operations are invoked, then the outputs from the vertex shader are passed to the next stage.

Geometry Shader

A geometry shader (GS) is a Shader program that governs the processing of primitives. A GS can create new primitives, unlike vertex shaders, which are limited to a 1:1 input to output ratio. A GS can also perform layered rendering, where different primitives can be rendered to different attached layered images.

The GS is optional; if it is not present, primitives passed from prior stages are given to the next stage directly.