标签:http color strong os cti for
http://www.opengl.org/wiki/Fragment
Fragment 是Raster的输出,输出可以是color value, stencil value或者depth value,写几个OpenGL例子
A Fragment is a collection of values produced by the Rasterizer. Each fragment represents a sample-sized segment of a rasterizedPrimitive. The size covered by a fragment is related to the pixel area, but rasterization can produce multiple fragments from the same triangle per-pixel, depending on various multisampling parameters and OpenGL state. There will be at least one fragment produced for every pixel area covered by the primitive being rasterized.
Fragments are processed in a manor similar to vertices in a Vertex Shader. An input vertex, build from Vertex Attributes defined duringVertex Specification, enters the Vertex Shader. After arbitrary processing, the vertex shader writes a number of values. These values represent the output vertex, and this output vertex is passed along to the next stages of the pipeline.
Fragments work the same way. An input fragment, built by the rasterizer, enters the Fragment Shader. After arbitrary processing, the fragment shader writes a number of values. These values represent the output fragment, and this output fragment is passed along to the next stage of the pipeline.
Initially, the data for a fragment consists of the following:
After processing, the output fragment from a fragment shader consists of the following:
The color value array elements are routed to different buffers based on the framebuffer‘s draw buffer state.
标签:http color strong os cti for
原文地址:http://www.cnblogs.com/kylegui/p/3812871.html