当前位置:网站首页>[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

边栏推荐
- [small sample segmentation] interpretation of the paper: prior guided feature enrichment network for fee shot segmentation
- [deep learning] activation function (sigmoid, etc.), forward propagation, back propagation and gradient optimization; optimizer. zero_ grad(), loss. backward(), optimizer. Function and principle of st
- Access denied for user ‘ODBC‘@‘localhost‘ (using password: NO)
- torch.histc
- What happens when a function is called before it is declared in C?
- Pathmeasure implements loading animation
- The preorder traversal of leetcode 144 binary tree and the expansion of leetcode 114 binary tree into a linked list
- Take you through a circuit board, from design to production (dry goods)
- 【EI检索】2022年第六届材料工程与先进制造技术国际会议(MEAMT 2022)重要信息会议网址:www.meamt.org会议时间:2022年9月23-25日召开地点:中国南京截稿时间:2
- 【TA-霜狼_may-《百人计划》】1.1 渲染流水线
猜你喜欢

复习专栏之---消息队列

Bilinear upsampling and f.upsample in pytorch_ bilinear

The combination of applet container technology and IOT

Leetcode 31 next spread, leetcode 64 minimum path sum, leetcode 62 different paths, leetcode 78 subset, leetcode 33 search rotation sort array (modify dichotomy)
![[小样本分割]论文解读Prior Guided Feature Enrichment Network for Few-Shot Segmentation](/img/b3/887d3fb64acbf3702814d32e2e6414.png)
[小样本分割]论文解读Prior Guided Feature Enrichment Network for Few-Shot Segmentation

谷粒学院微信扫码登录过程记录以及bug解决
![Online public network security case nanny level tutorial [reaching out for Party welfare]](/img/66/d9c848a7888e547b7cb28d84aabc24.png)
Online public network security case nanny level tutorial [reaching out for Party welfare]

Processing of menu buttons on the left and contents on the right of the background system page, and double scrolling appears on the background system page
![[nine day training] content III of the problem solution of leetcode question brushing Report](/img/7e/1e76181e56ef7feb083f9662df71c7.jpg)
[nine day training] content III of the problem solution of leetcode question brushing Report

静态库使用MFC和共享库使用MFC的区别
随机推荐
MFC窗口滚动条用法
【TA-霜狼_may-《百人计划》】1.3纹理的秘密
【JPCS出版】2022年第三届控制理论与应用国际会议(ICoCTA 2022)
【TA-霜狼_may-《百人计划》】1.4 PC手机图形API介绍
【TA-霜狼_may-《百人計劃》】2.3 常用函數介紹
Gorilla/mux framework (RK boot): RPC error code design
[TA frost wolf _may - "hundred people plan"] 1.4 introduction to PC mobile phone graphics API
LeetCode 144二叉树的前序遍历、LeetCode 114二叉树展开为链表
Valid brackets (force deduction 20)
Leetcode:829. Sum of continuous integers
bootsrap中的栅格系统
[EI conference] the Third International Conference on nanomaterials and nanotechnology in 2022 (nanomt 2022)
Leetcode:829. 连续整数求和
静态库使用MFC和共享库使用MFC的区别
205. isomorphic string
What happens when a function is called before it is declared in C?
LeetCode 128最长连续序列(哈希set)
[TA frost wolf \u may- hundred people plan] 2.3 introduction to common functions
IPv4 and IPv6, LAN and WAN, gateway, public IP and private IP, IP address, subnet mask, network segment, network number, host number, network address, host address, and IP segment / number - what does
pytorch训练深度学习网络设置cuda指定的GPU可见