1.定义
将模型经过mvp得到的标准立方体映射到屏幕。屏幕是像素数组组成,像素是一个颜色均匀的小方块。
![](https://img-blog.csdnimg.cn/img_convert/160d2dcfc0c946349c73f75b36e92530.png)
2.屏幕变换矩阵
![](https://img-blog.csdnimg.cn/img_convert/5327b0cbddca4b16998fc084d3302928.png)
![](https://img-blog.csdnimg.cn/img_convert/af90fba88af2473aac91bd12afb0a4ad.png)
3.直接采样(锯齿严重)
![](https://img-blog.csdnimg.cn/img_convert/5c94c75f048549fa9de208a7e58773a0.png)
![](https://img-blog.csdnimg.cn/img_convert/2d5d085cb57142d89d642cf19b8981fd.png)
4.先模糊再采样(抗锯齿有好转)
![](https://img-blog.csdnimg.cn/img_convert/0aa5ba158dff48168ca4de271a67cb92.png)
5.傅里叶变换
![](https://img-blog.csdnimg.cn/img_convert/1993e9e4a59b4f4aa23302ad625664bc.png)
![](https://img-blog.csdnimg.cn/img_convert/da290ce136d04bd9a6c24f1c6d2e69fd.png)
![](https://img-blog.csdnimg.cn/img_convert/c328d70b7bfb4c609357dede4ef490b7.png)
6.高通滤波(图像边界)
![](https://img-blog.csdnimg.cn/img_convert/c4406acf7b6849bc81490ef9fc1ce174.png)
7.低通滤波(遮罩)
![](https://img-blog.csdnimg.cn/img_convert/9c62fd4b929c450f8ab719a3c66de799.png)
8.高通和低通结合滤波
![](https://img-blog.csdnimg.cn/img_convert/69302e479bca4f299c4e1914b66114f3.png)
9.时域卷积等价频域傅里叶变换(卷积=低通滤波)
![](https://img-blog.csdnimg.cn/img_convert/b090595fb77c408e88fc90e3f6f70898.png)
10.时域/频域采样图(重复频率内容)
![](https://img-blog.csdnimg.cn/img_convert/74c4a4a5c8834c709f85cd157ac73198.png)
采样频率(f)越大,采样越不容易重叠
![](https://img-blog.csdnimg.cn/img_convert/3f0d14c5ada94e64a72e1526ee2fd326.png)
所以可以推出先模糊(低通滤波)后再采样可以抗锯齿
![](https://img-blog.csdnimg.cn/img_convert/b31d75364c204bfb9b0c39b38a042811.png)
11.常用抗锯齿方案(MSAA)
1.取每个像素中的NxN样本
2.平均每个像素的“内部”的NxN样本
![](https://img-blog.csdnimg.cn/img_convert/7186101458804c12aa7b74df67ecf5fe.png)
3.得出结果
![](https://img-blog.csdnimg.cn/img_convert/868bc26774b14d78bee5df9c93051419.png)