求和面积表与 Mipmap
求和区域表是一种预过滤技术,以避免纹理贴图中出现锯齿。我想知道它是如何工作的以及相对于 Mipmap 的优点和缺点是什么。谢谢
Summed area table is a pre-filtering technique to avoid aliasing in texture map. I would like to know how it works and what are the advantages and disadvantages over Mipmap. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
求和区域表将 X*Y 纹理 T 替换为 X*Y 值集 S,其中 S 中的条目 x,y 是包含在轴对齐矩形中的 T 所有像素的总和,其中 [0, 0] 到 [x, y](含)。
假设您想要计算 T 的任意轴对齐像素矩形的平均值,您只需对 S 中的角位置进行采样并进行一些简单的加法和减法即可。 (嗯。似乎 wikipedia 非常简洁地总结了这一点(双关语))
SAT 的优点在于,它可以快速为您提供任何任意轴对齐矩形的正确结果(而不是像 MIP 映射那样仅限于 2 的幂的平方),但
A summed area table replaces the X*Y texture, T, with an X*Y set of values, S, where entry x,y in S is the sum of all pixels of T contained in the axis-aligned rectangle from [0,0] to [x, y] inclusive.
Given that you want to compute the average of an arbitrary axis-aligned rectangle of pixels of T, you just need to sample the corner locations in S and do some trivial additions and subtractions. (Hmm. It seems that wikipedia sums (pun intended) this up quite succinctly)
The advantages of the SAT is that it will quickly give you the correct results for any arbitrary axis-aligned rectangle (rather than being limited to power-of-2 squares as in MIP mapping) but