当前位置:网站首页>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
边栏推荐
- POM configuration provided and test
- 第 3 篇:绘制三角形
- Leetcode 174 Dungeon games (June 23, 2022)
- 没有专业背景,还有机会成为机器学习工程师吗?
- Opencvsharp binary image anti color
- Configure your own free Internet domain name with ngrok
- L1-019 谁先倒 (15 分)
- 不止于观测|阿里云可观测套件正式发布
- Vulnhub target: boredhackerblog_ CLOUD AV
- Standing at the center of the storm: how to change the engine of Tencent
猜你喜欢

解决错误: LNK2019 无法解析的外部符号

Hongmeng OS development III

Hilbert Huang Transform

Svn actual measurement common operation record operation

毕业两年月薪36k,说难也不难吧

2022 PMP project management examination agile knowledge points (1)

SCM stm32f103rb, BLDC DC motor controller design, schematic diagram, source code and circuit scheme

Echart 心得 (一): 有关Y轴yAxis属性

慕思股份在深交所上市:毛利率持续下滑,2022年一季度营销失利

Exness: Powell insisted on his anti inflation commitment and pointed out that recession is possible
随机推荐
Practice of opengauss database on CentOS, configuration
4-operation list (loop structure)
Notes on the use of date and time base
Do you still have the opportunity to become a machine learning engineer without professional background?
Mousse shares listed on Shenzhen Stock Exchange: gross profit margin continued to decline, and marketing failed in the first quarter of 2022
运行npm run eject报错解决方法
研究生英语期末考试复习
Pair class notes
Domain environment importing Tencent cloud considerations
Echart 心得 (一): 有关Y轴yAxis属性
Graphmae - - lecture rapide des documents
解决 These dependencies were not found: * core-js/modules/es6.array.fill in xxx 之类的问题
Examples of corpus data processing cases (reading multiple text files, reading multiple files specified under a folder, decoding errors, reading multiple subfolder text, batch renaming of multiple fil
云开发谁是卧底小程序源码
站在风暴中心:如何给飞奔中的腾讯更换引擎
第 3 篇:绘制三角形
Common array encapsulation
POM configuration provided and test
[data update] Xunwei comprehensively upgraded NPU development data based on 3568 development board
慕思股份在深交所上市:毛利率持续下滑,2022年一季度营销失利