当前位置:网站首页>[ta- frost wolf \u may- hundred people plan] 1.1 rendering pipeline
[ta- frost wolf \u may- hundred people plan] 1.1 rendering pipeline
2022-07-01 03:47:00 【zczplus】
【TA_ Frost Wolf _may《 Hundred people plan 》】1.1 Rendering pipeline
【TA_ Frost Wolf _may《 Hundred people plan 》】1.1 Rendering pipeline
As the title , This is frost wolf _may《 Hundred people plan 》 A record of learning , Clear direction , Start studying hard .
1.1.1 Application stage
Prepare basic scene data
The basic data include :
- Scene object data
- Object transformation data : Location 、 rotate 、 The zoom
- Object grid data : Vertex Position 、uv Mapping
- Camera data
- Location 、 Direction 、 Near and far clipping plane
- orthogonal / perspective (FOV)
- Viewport scale / Size, etc
- Light source shadow data ( There are many contents in this part , Shadow related knowledge is not understood )
- Type of light source : Directional light 、 Spot light 、 Spotlight
- Other parameters of the light source : Location 、 Direction 、 Angle, etc.
- And other global data
Acceleration algorithm
Coarse grained culling
Those outside the scene can be eliminated , Those blocked by objects in front can also be eliminated .
The basic operations include :
- collision detection
- Acceleration algorithm
- Occlusion culling
- Other algorithms
Visible scene object clipping algorithms are :
- Octree
- BSP Trees
- K-D Trees
- BVH
Set render state
Prepare rendering parameters
The basic operations include :
- Draw settings ( Different objects may have different shader( Shaders ) To render )
- Draw order ( for example : Render from near to far or from far to near , The rendering order of opacity and translucency is determined )
- Render Target ( Destination settings for rendering results ( RenderTexture or FrameBuffer))
- Rendering mode ( Imaging rendering or Deferred Shading )
call DrawCall
Output rendered primitives to video memory
The data to be used include :
- Vertex data
- Other data
1.1.2 Geometric stage
Vertex Shader
The overall process is as shown in the figure :
Model transformation , View transformation , Projection transformation consists of MVP(Model、View、Projection) matrix .
Surface subdivision
The overall process is as shown in the figure :
Geometric coloring ( Element based operations )
The overall process is as shown in the figure :
Projection
Different projections have different characteristics , Use perspective division to process , It is divided into orthogonal projection and perspective projection .
In perspective projection , Object's w The value increases with distance from the camera , Coordinate points (xyz) By dividing by w To get the result coordinates of perspective , So as to achieve the purpose of perspective imaging .
Orthogonal projection w The value is always 1, It may be more similar to 2D imaging .
This step is NDC 了 .

tailoring
Remove targets and vertices outside the field of view .
The cutting diagram is as follows :
Add : The equipment coordinate system is openGL and D3D It's different in :
- opnGL in ,xyz All three dimensions are -1 ~ 1
- D3D in ,xy by -1 ~ 1,z by 0 ~ 1
Screen mapping
Map the position in the standard coordinate system to the screen coordinate system .
It is also important to note that , The origin position of the screen coordinate system is openGL and D3D There are also differences in :
- openGL The screen origin is at the bottom left
- D3D The screen origin is at the top left
1.1.3 Grating stage
Triangle settings
After knowing the vertex information of triangle or line , You want to know which pixels this primitive covers , It is necessary to obtain its boundary information . The process of calculating boundary information is called triangle setting . Triangle information contains line information , The following content only discusses the case of triangles .
Triangle traversal
Through the edge information of the triangle , Using interpolation algorithm , Assign values to all pieces inside the triangle .
Be careful , The boxes in the above figure represent slices, not pixels , Because in the same pixel position on the screen , There may be different pieces corresponding to multiple triangles .
Anti-Aliasing
many-ways :
- SSAA( Enlarge the rendering resolution n times , Again buffer Take the next sample )
- MSAA
- Only this method operates in the rasterization stage
- Set multiple sub sampling points for each pixel
- Then the coverage test and occlusion test are carried out for each sub sampling point
- Coverage test is to judge whether the sub sampling point is in the triangle
- Occlusion test is to compare the sub sampling point with the data in the depth cache , See if you can pass
- The sub sampling points passing the above test belong to the triangle
- In the following triangle coloring , Scale shading by sub sample points belonging to triangles ( This sentence needs further understanding )

1.1.4 Slice by slice operation
Chip coloring

Color blending
Including a variety of testing links :
- Transparency test

- Depth testing 、 Template testing

The purpose and significance of the template test here are not well understood , You can learn more about .
blend
Combine all kinds of information ( Including color 、Alpha、 Depth, etc ), Mix the final color . There are many ways to mix : superposition …
Overall process summary

边栏推荐
- Leetcode 128 longest continuous sequence (hash set)
- 30. Concatenate substrings of all words
- 4、【WebGIS实战】软件操作篇——数据导入及处理
- 【EI会议】2022年国际土木与海洋工程联合会议(JCCME 2022)
- The combination of applet container technology and IOT
- Cygwin的下载和安装配置
- [reach out to Party welfare] developer reload system sequence
- 168. excel table column name
- Binary tree god level traversal: Morris traversal
- [JPCs publication] the Third International Conference on control theory and application in 2022 (icocta 2022)
猜你喜欢

Error: plug ins declaring extensions or extension points must set the singleton directive to true

LeetCode 128最长连续序列(哈希set)

The difference between MFC for static libraries and MFC for shared libraries

Asgnet paper and code interpretation 2
![[TA frost wolf \u may- hundred people plan] 1.3 secret of texture](/img/dc/ce2819258632cdcf2e130a4c05600e.png)
[TA frost wolf \u may- hundred people plan] 1.3 secret of texture
![[ta - Frost Wolf May - 100 people plan] 2.3 Introduction aux fonctions communes](/img/be/325f78dee744138a865c13d2c20475.png)
[ta - Frost Wolf May - 100 people plan] 2.3 Introduction aux fonctions communes

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

【TA-霜狼_may-《百人计划》】2.2 模型与材质空间

Sort linked list (merge sort)

TEC: Knowledge Graph Embedding with Triple Context
随机推荐
Golang multi graph generation gif
[深度学习]激活函数(Sigmoid等)、前向传播、反向传播和梯度优化;optimizer.zero_grad(), loss.backward(), optimizer.step()的作用及原理
[nine day training] content III of the problem solution of leetcode question brushing Report
Error: plug ins declaring extensions or extension points must set the singleton directive to true
【TA-霜狼_may-《百人计划》】1.2.2 矩阵计算
报错:Plug-ins declaring extensions or extension points must set the singleton directive to true
205. 同构字符串
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
6. zigzag transformation
用小程序的技术优势发展产业互联网
Random seed torch in deep learning manual_ seed(number)、torch. cuda. manual_ seed(number)
Quickly filter data such as clock in time and date: Excel filter to find whether a certain time point is within a certain time period
Valentine's Day is nothing.
快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内
【EI会议】2022年国际土木与海洋工程联合会议(JCCME 2022)
241. 为运算表达式设计优先级
Asgnet paper and code interpretation 2
[TA frost wolf \u may- hundred people plan] 1.3 secret of texture
How to display scrollbars on the right side of the background system and how to solve the problem of double scrollbars
Complete knapsack problem