在片段着色器通常会发生变形。
片段着色器是可选的。
如何写通过一个附加的纹理帧的顶点和片段着色器?
How to write pass-through vertex and fragment shaders for a frame buffer with attached texture?
片段着色器输出的片段数据要经过一系列后续步骤。
The fragment data output from the fragment processor is then passed through a sequence of steps.
第一个化身是像素着色器,也被称为片段着色器,这个名字仍然有意义。
The first incarnation of these were pixel shaders, also known as fragment shaders, where the name still made sense.
片段着色器的输出结果是深度值、模板值和即将写入颜色缓存的颜色值。
The output from a fragment shader is a list of colors for each of the color buffers being written to, a depth value, and a stencil value.
片段着色器不能设置片段的模板值,但是确实能够控制片段的颜色值和深度值。
Fragment shaders are not able to set the stencil data for a fragment, but they do have control over the color and depth values.
注意:尽管这些测试名义上是在片段着色器之后发生的,在某些条件下他们其实可以在片段着色器之前发生。
Note: Though these are specified to happen after the fragment shader, they can be made to happen before the fragment shader under certain conditions.
当你只需要将图元的深度信息写入深度缓存时(例如在施展遮挡查询测试时),不使用片段着色器的渲染过程就很有用。
Rendering without a fragment shader is useful when rendering only a primitive's default depth information to the depth buffer, such as when performing Occlusion Query tests.
当你只需要将图元的深度信息写入深度缓存时(例如在施展遮挡查询测试时),不使用片段着色器的渲染过程就很有用。
Rendering without a fragment shader is useful when rendering only a primitive's default depth information to the depth buffer, such as when performing Occlusion Query tests.
应用推荐