DX 10 管线流程

来源:互联网 发布:科比0506赛季得分数据 编辑:程序博客网 时间:2024/06/07 06:13

DX10管线流程:

Input-Assembler Stage:负责提供数据(如三角形、线、点)给管线。

Vertex-Shader Stage:处理顶点。通常做转换、skinning、和光照。vertex Shader总是输入一个顶点,输出一个顶点。

Geometry-Shader Stage:处理整个图元。输入是一个完整的图元(三角形的三个顶点,线的两个顶点,点的一个顶点)。每个图元也能包含邻边图元的顶点数据。这能包含最多额外的一个三角形的三个顶点或者一条线的两个顶点。Geometry Shader也支持有限的几何放大和缩小。考虑一个输入的图元,geometry Shader能丢弃图元或者产生一个或者多个新的图元。

Stream-Output Stage: 输出流阶段是设计用来将图元数据传给光栅化处理器过程中,从管线中流输入到内存中。数据能流输出和传给光栅化处理器。传给内存的数据能循环回来到管线中作为输入和从CPU读回的数据。

Rasterizer Stage: 光栅化阶段负责裁剪图元,为pixel shader准备图元并且决定如何调用pixel shader

Pixel Shader Stage: pixel shader阶段接受一个图元插值后的数据并且产生每个像素的数据,如颜色值。

Output-Merger Stage: 输出合并阶段负责把不同类型的输出数据(pixel shader值,深度和模板信息)和渲染目标的内容和深度/模板缓冲结合起来以产生最终管线结果。

  • Input-Assembler Stage - The input-assembler stage is responsible for supplying data (triangles, lines and points) to the pipeline.
  • Vertex-Shader Stage - The vertex-shader stage processes vertices, typically performing operations such as transformations, skinning, and lighting. A vertex shader always takes a single input vertex and produces a single output vertex.
  • Geometry-Shader Stage - The geometry-shader stage processes entire primitives. Its input is a full primitive (which is three vertices for a triangle, two vertices for a line, or a single vertex for a point). In addition, each primitive can also include the vertex data for any edge-adjacent primitives. This could include at most an additional three vertices for a triangle or an additional two vertices for a line. The Geometry Shader also supports limited geometry amplification and de-amplification. Given an input primitive, the Geometry Shader can discard the primitive, or emit one or more new primitives.
  • Stream-Output Stage - The stream-output stage is designed for streaming primitive data from the pipeline to memory on its way to the rasterizer. Data can be streamed out and/or passed into the rasterizer. Data streamed out to memory can be recirculated back into the pipeline as input data or read-back from the CPU.
  • Rasterizer Stage - The rasterizer is responsible for clipping primitives, preparing primitives for the pixel shader and determining how to invoke pixel shaders.
  • Pixel-Shader Stage - The pixel-shader stage receives interpolated data for a primitive and generates per-pixel data such as color.
  • Output-Merger Stage - The output-merger stage is responsible for combining various types of output data (pixel shader values, depth and stencil information) with the contents of the render target and depth/stencil buffers to generate the final pipeline result.


0 0
原创粉丝点击