当前位置:网站首页>Games101 review: rasterization
Games101 review: rasterization
2022-07-26 02:23:00 【Lao Yan is working hard】
- MVP What to do after the transformation ? Naturally, the transformed view is mapped to the screen space .
- In the end
Mapping to Screen space Up .
- When all triangles are on the screen , Then draw the triangle , This process is called Rasterize .
- utilize The center of the pixel ( Whether it is in a triangle ), The function of triangle visibility is sampling .
- Processing anti aliasing ( Anti-Aliasing )AntiAliasing
Catalog
1.1 Define the screen 、 Screen space
1.2 Viewport transform : Transform the standard cube coordinates into screen space
2.1 triangle : The most basic element
3.0 Several kinds of graphics Sampling Artifacts
3.2 frequency domain (Frequency Domain)
3.2.1 The Fourier transform (Fourier Transform): Time domain --> frequency domain
3.2.2 High frequency signals require high frequency sampling , Some visualization examples
3.2.3 Frequency domain diagram : High pass filtering 、 Low pass filtering 、 A band pass filter
3.2.4 Convolution operation : Addition in time domain = Multiplication in frequency domain
3.2.5 sampling = Repeat the content in the frequency domain
3.3 Several anti aliasing techniques
3.3.1 MSAA( Multisampling anti aliasing ): Improve resolution , Calculate the average
3.3.2 FXAA(Fast Approximate AA): Fast approximate anti aliasing
3.3.3 TAA(Temporal AA): Time domain anti aliasing
3.3.4 DLSS(Deep Learning Super Sampling): Deep learning anti aliasing
4. Visibility and occlusion (Visibility/Occlusion)
4.0 Painter algorithm Painter's Algorithm
4.1 Z-Buffering Deep buffer , stay GPU Hardware implementation
1. Viewport transform
1.1 Define the screen 、 Screen space

1.2 Viewport transform : Transform the standard cube coordinates into screen space

2. Rasterize
2.1 triangle : The most basic element
- Guaranteed to be a plane
- It is easy to define the inside and outside of a triangle ( By cross multiplication )
- The attributes of any point in the triangle can be obtained by interpolation
2.2 sampling : Discretization of continuous functions , On the center of the pixel (x+0.5,y+0.5) sampling
Sampling can be done in time , You can also sample at a location

2.2.1 AABB Bounding box ( Axis alignment bounding box ): The method of finding the optimal surrounding space of the discrete points
Collision detection AABB Bounding box _ Star dot blog -CSDN Blog _aabb Bounding box

3. Anti aliasing


3.0 Several kinds of graphics Sampling Artifacts



3.1 The reason for the distortion : The sampling frequency cannot be synchronized with the signal frequency
3.2 frequency domain (Frequency Domain)


3.2.1 The Fourier transform (Fourier Transform): Time domain --> frequency domain
Use Fourier series to approximate the original function :


3.2.2 High frequency signals require high frequency sampling , Some visualization examples


3.2.3 Frequency domain diagram : High pass filtering 、 Low pass filtering 、 A band pass filter
High pass filtering : Only keep the high frequency part , Visually, the boundary is preserved , Because the boundary is the most dramatic part of the image .

Low pass filtering : Only the low frequency part is reserved , Visually, it is fuzzy , It can be understood as removing obvious boundary parts .


3.2.4 Convolution operation : Addition in time domain = Multiplication in frequency domain
thus , There are two ways to realize convolution :


3.2.5 sampling = Repeat the content in the frequency domain

3.2.6 Anamorphosis = Content mixing in frequency domain , That is, there are overlapping parts on the function

3.2.7 Anti aliasing = Limit the mixing of content in the frequency domain , The high-frequency part is removed by filtering before sampling

So this is why the principle of aliasing can be solved to a certain extent by filtering :

3.2.8 From the above, we can get : The anti aliasing effect can be achieved by convolution in a certain pixel area , Take the mean
3.3 Several anti aliasing techniques
3.3.1 MSAA( Multisampling anti aliasing ): Improve resolution , Calculate the average
For example, every previous point is divided into 1×1 The pixel is increased to 2×2 Pixels of

Then take samples , And calculate the average



3.3.2 FXAA(Fast Approximate AA): Fast approximate anti aliasing
Find the jagged image boundary by image matching , And replace it with a borderless image , Very fast , Independent of sampling , Use image method
3.3.3 TAA(Temporal AA): Time domain anti aliasing
Reuse the information of the previous frame , amount to MSAA The corresponding samples are distributed in time .
3.3.4 DLSS(Deep Learning Super Sampling): Deep learning anti aliasing
Some information will be lost during upsampling ( Serrate ), Insufficient sampling rate , Using deep learning techniques “ guess ” Show the missing details .
4. Visibility and occlusion (Visibility/Occlusion)
4.0 Painter algorithm Painter's Algorithm

4.1 Z-Buffering Deep buffer , stay GPU Hardware implementation
- Access the pixel depth value nearest to us in a Buffer in , It's called deep cache ,Z-Buffer
- Cache the information after mixing the pixels closest to us , be called frame buffer

z-buffer Algorithm :


边栏推荐
- Basic usage of set, map, DOM classlist in ES6
- 2022.7.25-----leetcode.919
- [C language brush leetcode] 1604. Warn people who use the same employee card more than or equal to three times within an hour (m)
- ERROR: could not extract tar starting at offset 000000000000020980+9231072+2
- 微信小程序解密并拆包获取源码教程
- [2021] [paper notes] 6G technology vision - otfs modulation technology
- I.MX6UL核心模块使用连载-WIFI测试 (八)
- Business Intelligence BI full analysis, explore the essence and development trend of Bi
- 主键B+ Tree,二级索引B+ Tree及对应的查询过程分析
- Activiti workflow gateway
猜你喜欢

Keil's operation before programming with C language

Bitmap这个“内存刺客”你要小心~

Primary key b+ tree, secondary index b+ tree and corresponding query process analysis

ggplot2学习总结

Ggplot2 learning summary

Error reporting caused by local warehouse

信息系统项目管理师---第十章沟通管理和干系人管理历年考题

prometheus+redis-exporter+grafana 监控redis服务

What does the Red Cross in the SQL editor mean (toad and waterdrop have been encountered...)

obsidian移动端PC段同步
随机推荐
租户问题。
Obsidian mobile PC segment synchronization
Exclusive interview with ringcentral he Bicang: empowering future mixed office with innovative MVP
Uni app cross domain configuration
Wechat applet - get user location (longitude and latitude + city)
【PyQt5打包为exe】
c# 单元测试
Manifold learning
Prometheus + process exporter + grafana monitor the resource usage of the process
From a data incremental processing problem, we can see the consciousness gap of technicians
19_ Request forms and documents
[red team] att & CK - using bits services to achieve persistence
MySQL(4)
TCP三次握手四次挥手
3. Upload the avatar to qiniu cloud and display it
ERROR: could not extract tar starting at offset 000000000000020980+9231072+2
Design and driver transplantation of matrix keyboard circuit of Ti am335x industrial control module
Business Intelligence BI full analysis, explore the essence and development trend of Bi
我来图书馆小程序一键签到和一键抢位置工具
Pinia的数据持久化插件 pinia-plugin-persist
Mapping to Screen space Up .