当前位置:网站首页>GAMES101复习:光栅化
GAMES101复习:光栅化
2022-07-26 02:22:00 【老闫在努力】
- MVP变换之后该做什么?自然是将变换好的视图映射到屏幕空间上。
- 最终会把
映射到屏幕空间上去。
- 当所有的三角形都已经屏幕上,这时就要把三角形画出来,这个过程就叫光栅化。
- 利用像素的中心(是否在三角形内),对三角形可见性的函数进行采样。
- 处理反走样(抗锯齿)AntiAliasing
目录
2.2 采样:对连续函数的离散化,对像素中心(x+0.5,y+0.5)进行采样
2.2.1 AABB包围盒(轴对齐包围盒):求解离散点最优包围空间的方法
3.2.1 傅里叶变换(Fourier Transform):时域-->频域
3.2.7 反走样 = 限制频域上内容的混合,在采样前通过滤波去除高频部分
3.2.8 由以上可得出:可通过在一定像素区域卷积来达到反走样的效果,取均值
3.3.1 MSAA(多重采样抗锯齿):提高分辨率,算平均值
3.3.2 FXAA(Fast Approximate AA):快速近似抗锯齿
3.3.4 DLSS(Deep Learning Super Sampling):深度学习抗锯齿
4. 可见性与遮挡(Visibility/Occlusion)
1. 视口变换
1.1 定义屏幕、屏幕空间

1.2 视口变换:将标准立方体坐标变换到屏幕空间

2. 光栅化
2.1 三角形:最基本的图元
- 保证是一个平面
- 容易定义三角形内外(通过叉乘)
- 三角形内任意一点的属性可通过插值获得
2.2 采样:对连续函数的离散化,对像素中心(x+0.5,y+0.5)进行采样
采样可以在时间上采样,也可以在位置上采样

2.2.1 AABB包围盒(轴对齐包围盒):求解离散点最优包围空间的方法
碰撞检测之 AABB 包围盒_星星光点的博客-CSDN博客_aabb包围盒

3. 反走样


3.0 图形学中的几种Sampling Artifacts



3.1 走样的原因:采样频率无法与信号频率同步
3.2 频域(Frequency Domain)


3.2.1 傅里叶变换(Fourier Transform):时域-->频域
利用傅里叶级数近似原函数:


3.2.2 高频信号需要高频采样,一些可视化例子


3.2.3 频域图:高通滤波、低通滤波、某频段通滤波
高通滤波:只保留高频率部分,视觉上表现为保留边界,因为边界是图像中变化最剧烈的部分。

低通滤波:只保留低频部分,视觉上表现为模糊,可理解为去除明显的边界部分。


3.2.4 卷积操作:时域中的加法=频域中的乘法
由此,卷积的实现可以有两种方法:


3.2.5 采样=重复频域上的内容

3.2.6 走样=频域上内容混合,即函数上有交叉的部分

3.2.7 反走样 = 限制频域上内容的混合,在采样前通过滤波去除高频部分

所以这也就是为什么可以通过滤波的方式能一定程度上解决走样的原理:

3.2.8 由以上可得出:可通过在一定像素区域卷积来达到反走样的效果,取均值
3.3 几种反走样技术
3.3.1 MSAA(多重采样抗锯齿):提高分辨率,算平均值
比如把之前每个点由1×1像素提升为2×2的像素点

随后进行采样,并算得均值



3.3.2 FXAA(Fast Approximate AA):快速近似抗锯齿
通过图像匹配的方法找到锯齿的图像边界,并换成没有边界的图像,速度十分快,与采样无关,用图像的方法
3.3.3 TAA(Temporal AA):时域抗锯齿
复用上一帧的信息,相当于MSAA对应的样本分布在了时间上。
3.3.4 DLSS(Deep Learning Super Sampling):深度学习抗锯齿
上采样时会丢失一些信息(产生锯齿),采样率不够,利用深度学习技术“猜”出缺失的细节。
4. 可见性与遮挡(Visibility/Occlusion)
4.0 画家算法Painter's Algorithm

4.1 Z-Buffering深度缓冲,在GPU硬件中实现
- 存取离我们最近的像素深度值在一个Buffer中,叫深度缓存,Z-Buffer
- 把离我们最近的像素点混合后的信息缓存,叫做frame buffer

z-buffer 算法:


边栏推荐
- Tenant issues.
- [2021] [paper notes] biological effects of cell membrane under infrared and THz - effect is a phenomenon, action is a mechanism - the benefits of THz to medicine
- Activiti workflow gateway
- ERROR: could not extract tar starting at offset 000000000000020980+9231072+2
- TCP三次握手四次挥手
- BigDecimal use
- [leetcode] 32. Longest valid bracket
- 【红队】ATT&CK - 利用BITS服务实现持久化
- 1. Mx6ul core module use serial -rs485 test (x)
- 2022.7.25-----leetcode.919
猜你喜欢

1. Mx6ul core module use serial RTC test (XII)
![[xxl-job] xxl-job learning](/img/2c/d3872983e4228a3ef52a9d1bef836e.png)
[xxl-job] xxl-job learning

Prometheus + process exporter + grafana monitor the resource usage of the process

Illustration of the insertion process of b+ tree

Error reporting caused by local warehouse
![[cloud native] 4.1 Devops foundation and Practice](/img/09/5423540d0a4a11bc7162c5ab343a4d.png)
[cloud native] 4.1 Devops foundation and Practice

Prometheus+blackbox exporter+grafana monitoring server port and URL address

微信小程序解密并拆包获取源码教程

Are you still using ==0 null equal to judge null values? How much do you know about isempty and isblank

Handling process of the problem that the virtual machine's intranet communication Ping fails
随机推荐
Be careful about bitmap, the "memory Assassin"~
(CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud
[C language brush leetcode] 814. Binary tree pruning (m)
Manifold learning
[2020] [paper notes] growth of bi2te3/cofeb double-layer heterojunction by magnetron sputtering——
scipy.sparse.vstack
A pluggable am335x industrial control module onboard WiFi module
[2021] [paper notes] 6G technology vision - otfs modulation technology
I.MX6UL核心模块使用连载-nand flash读写测试 (三)
Illustration of the insertion process of b+ tree
1. Mx6ul core module serial WiFi test (VIII)
17_ Form Data
1. Mx6ul core module serial USB interface test (VI)
LeetCode302场周赛第三题--裁剪数字后查询第 K 小的数字
Acwing 379. hide and seek problem solution (minimum path non repeating point coverage)
一款可插拔的AM335X工控模块板载wifi模块
3. Upload the avatar to qiniu cloud and display it
Sqlyog data import and export graphic tutorial
Adruino 基础实验学习(一)
I.MX6UL核心模块使用连载-以太网测试 (七)
映射到屏幕空间上去。