Vertex Shader & Pixel Shader Introduction

zhaozj2021-02-17  46

Vertex Shader & Pixel Shader Introduction

1. Fixed Function Graphics Pipeline (FIXED FUNCTION Graphics Pipeline)

The graphics processing line of the graphics card capable of implementing Vertex Shader and Pixel Shader is called being programmable, relatively, before this graphics processing pipeline is called a fixed function, the following is one of OpenGL graphics processing. Simply map:

The complete OpenGL graphics processing line is called OpenGL machine (OpenGL Machine, this frame map can be found on the OpenGL reference manual), just like a circuit diagram, there are many switches above, we can open or close these switches, It is also possible to set the parameters of the various processing units in the drawing to control the process, but in any case, the function of the entire system has been determined, you can only use or do not use certain features and the right to control certain functions. Implement your own customization, so this graphic processing pipeline is called a fixed function. (With a powerful graphics manufacturer adds many OpenGL extensions to achieve some standard OpenGL specifications in its own OpenGL implementation, now there is a programmable graphics pipeline, and general users also have some own custom functions.)

2. Vertex Shader & Pixel Shader

Although the graphic pipeline for realizing Vertex Shader and Pixel Shader is called being programmable, only part of the pipeline actually programmable, as in Vertex Shader and Pixel Shader, now programmable parts only have the vertex And the unit of processing pixels.

Vertex Shader and Pixel Shader have different names in different documents, NVIDIA called Vertex Shader in its own OpenGL extension, called Pixel Shader called Texture Shader, 3DLabs presents this OpenGL 2.0 proposal to this Both are called Vertex Shader and Fragment (IL) Shader. Throwing the difference between the schematic, the actual function is almost the same, and the following words have a perfect explanation for this situation:

Shader or Program? Shader has been used as the preferred name as this fits in with common usage in RenderMan and DX8. There is some argument that shading has connotations of being a color operation so does not fit with a vertex operation. RenderMan doesn ' T Make this distinction, Nor does DX8. It Seem Wise to Go Along With The Common Usage of Shader As a General Term for a Program Which Operates on Some Part of A Graphics Pipeline.

转载请注明原文地址:https://www.9cbs.com/read-28380.html

New Post(0)