当前位置:网站首页>Graphics rendering pipeline
Graphics rendering pipeline
2022-06-26 02:04:00 【_ Bruce】
Several render stages of the graphics rendering pipeline :
The first part of the graphics rendering pipeline is Vertex shader (Vertex Shader), It takes a single vertex as input . The main purpose of vertex shaders is to transform 3D The coordinates change to another 3D coordinate ( It will be explained later ), At the same time, vertex shaders allow us to do some basic processing of vertex attributes .
Primitive Assembly (Primitive Assembly) Phase takes all vertices output by the vertex shader as input ( If it is GL_POINTS, So it's a vertex ), And all the points are assembled into the shape of the specified element ; The example in this section is a triangle .
The output of the element assembly phase is passed to the geometry shader (Geometry Shader). Geometry shaders take a set of vertices in the form of primitives as input , It can construct new... By generating new vertices ( Or something else ) Elements to create other shapes . In the example , It makes another triangle .
Geometry shaders The output of the is passed into the rasterization phase (Rasterization Stage), Here it maps the primitives to the corresponding pixels on the final screen , Generate for Fragment Shader (Fragment Shader) The fragments used (Fragment). Clipping is performed before the fragment shader runs (Clipping). Clipping discards all pixels beyond your view , To improve the efficiency of execution .
OpenGL One of the clips in is OpenGL All the data needed to render a pixel .
Fragment Shader The main purpose of is to calculate the final color of a pixel , This is all OpenGL Where high-level effects come from . Usually , Fragment shaders contain 3D Scene data ( Like light 、 shadow 、 The color of light and so on ), This data can be used to calculate the final pixel color .
After all corresponding color values are determined , The final object will be passed to the last stage , We call it Alpha Testing and mixing (Blending) Stage . This stage detects the corresponding depth of the fragment ( And template (Stencil)) value ( The back can speak ), Use them to determine whether the pixel is in front of or behind other objects , Decide whether you should discard . This stage will also check alpha value (alpha Value defines the transparency of an object ) And mix the objects (Blend). therefore , Even if the color output of a pixel is calculated in the clip shader , When rendering multiple triangles, the final pixel color may also be completely different .
边栏推荐
- 如何高效的完成每日的任务?
- Data analysis - similarities and differences between C-end and b-end data analysis
- 将weishi相机图片进行转换
- PTA class a simulated seventh bomb: 1160-1163
- Input 3 integers and output them from large to small
- Mot - clé C facile à comprendre statique
- Redis7.0的安装步骤
- A solution to cross domain problems
- PTA class a simulated ninth bullet: 1114-1117
- -- EGFR FISH probe solution
猜你喜欢
Abnova CMV CISH probe solution
How to add a "security lock" to the mobile office of government and enterprises?
Differences and functions of TOS cos DSCP
Exploring temporary information for dynamic network embedding
Show spirit chenzitong was invited to be the chief experience officer of the global finals of the sixth season perfect children's model
The answer skills and examples of practical cases of the second construction company are full of essence
论文阅读 Exploring Temporal Information for Dynamic Network Embedding
Xiaomi tablet 5 Pro unlock bootloader
V4L2+QT视频优化策略
轻轻松松理解指针
随机推荐
字节序问题
将lua print输出到cocos2d控制台输出窗口中
如何高效的完成每日的任务?
标定。。。
LeetCode 31 ~ 40
buffer
pixel 6 root
FPGA实现图像二值形态学滤波——腐蚀膨胀
Output Lua print to the cocos2d console output window
Dazhou suggested that we media bloggers do these four things in the early stage
轻轻松松理解指针
Redis-链表
Show spirit chenzitong was invited to be the chief experience officer of the global finals of the sixth season perfect children's model
Command of gun make (4) rule
宁要一个完成,不要千万个开始(转载自豆瓣)
Make a row of the dataframe a column name
Redis7.0的安装步骤
V4L2+QT视频优化策略
Pre ++, post ++ and pre -- and post -- (+a, a++ and --a, a--)
PTA class a simulated seventh bomb: 1160-1163