当前位置:网站首页>Pipeline concept of graphic technology
Pipeline concept of graphic technology
2022-06-24 08:04:00 【Kenight_】
Pipeline: The output of each step will be used as the input of the next step , Render passes in GPU Is a parallel operation , The blue background part can be passed through shader Code control

1. Vertex Shader
Vertex transformation ; Coordinate transformation
2. Shape Assembly / Primitive Assembly
Convert vertices to primitives ( Here is the triangular surface ), And cut out the primitive data in the field of view
3. Geometry Shader
Generate other primitives by increasing or decreasing vertices
4. Rasterization / Rasterize
Rasterization is the process of transforming an entity into a two-dimensional image , Each point on the two-dimensional image contains color 、 Depth and texture data , Such a point is called pianyuan fragment
An entity will be converted to multiple slices , And type in fragment shader in
The process :4 The vertices are rasterized to form a 10*10 Pixel graphics , be fragment shader Parallel processing 100 Time (Vertex shader parallel processing 4 Time )
5. Fragment Shader
Texture mapping of slices 、 Light calculation forms pixels
6. Test and Blend
In the end ,fragment Shader The output pixels in also need to be connected with buffer Pixel points at corresponding positions stored in ( Other objects rendered in the current frame ) Carry on all kinds of test And blending after , Form the pixels finally displayed on the screen
Stencil Test ( Template testing ):
by shader Set a reference value for the rendered pixels in Ref , Then with stencil buffer Compare the values stored in the corresponding pixel in , Render through or discard
Each pixel on the screen has a stencil buffer value , The default is 0, Can be set to 0 - 255
Use Stencil test when , The usual practice is to use a shader to update buffer value , In passing for others shader Set up Ref From previous buffer Comparison produces various special effects
Depth Test ( Depth testing ):
By default , Compares the depth value of the current rendered pixel with Depth buffer Compare the depth values of the corresponding pixels in , If it is smaller than the value in the cache , Replace the value of the corresponding pixel in the cache with the new pixel value , After the in-depth test , The order in which objects are rendered is less important , Can be displayed normally according to the depth value
ZWrite: When on, the depth value is written to depth buffer in , Pixel if no depth value is written , It seems that there is no near and far effect
ZTest: adopt ZTest The depth value and color value can be written into the cache ( stay ZTest after , If the color value is not written to the cache , The rendered pixels will not show the color on the final screen )
Blend ( blend ):
Defines the current rendered pixel and frame cache (G buffer) Blending between rendered pixels in
Rendered pixels are : Pixels of other objects rendered in the current frame , Like the pixels of another piece of rendered grass
grammar :Blend SrcFactor DstFactor ( New rendered pixels * SrcFactor + There are already pixels on the screen * DstFactor)
other :
G buffer There is a store of : Template cache (stencil buffer)、 The depth of the cache (z / depth buffer)、 Color the cache (color / pixel buffer) Etc
Reference documents :learnopengl Nishikawa Shinji
边栏推荐
- 10. Tencent cloud IOT device side learning - firmware upgrade
- LeetCode练习——跳跃游戏、组合求和
- Using kubeconfig files to organize cluster access
- Chapter 3 curve graph of canvas
- How to cancel the display of the return button at the uniapp uni app H5 end the autobackbutton does not take effect
- On the H5 page, the Apple phone blocks the content when using fixed to locate the bottom of the tabbar
- 首次曝光 唯一全域最高等级背后的阿里云云原生安全全景图
- Hongmeng OS development III
- Thread support
- Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row
猜你喜欢
随机推荐
没有专业背景,还有机会成为机器学习工程师吗?
Baidu map, coordinate inversion, picking coordinate position
L1-019 who goes first (15 points)
Any remarks
调用Feign接口时指定ip
Hongmeng development IV
Signature analysis of app x-zse-96 in a Q & a community
The monthly salary of two years after graduation is 36K. It's not difficult to say
Oracle advanced SQL qualified query
3-list introduction
Chapter 4 line operation of canvas
Vulnhub靶机:BOREDHACKERBLOG: SOCIAL NETWORK
慕思股份在深交所上市:毛利率持续下滑,2022年一季度营销失利
第 3 篇:绘制三角形
uniapp uni-app H5 端如何取消 返回按钮的显示 autoBackButton不生效
SVN实测常用操作-记录操作大全
Screenshot recommendation - snipaste
Echart 心得 (一): 有关Y轴yAxis属性
Latest news of awtk: new usage of grid control
3-列表简介







