多重采样抗锯齿(MultiSampling Anti-Aliasing,簡稱MSAA)是一种特殊的超级采样抗锯齿(SSAA)。MSAA首先来自于OpenGL。具体是MSAA只对Z缓存(Z-Buffer)和模板缓存(Stencil Buffer)中的数据进行超级采样抗锯齿的处理。可以简单理解为只对多边形的边缘进行抗锯齿处理。这样的话,相比SSAA对画面中所有数据进行处理,MSAA对资源的消耗需求大幅減少,不过在画质上可能稍有不如SSAA。

http://www.cnblogs.com/mikewolf2002/archive/2012/11/24/2785441.html

http://en.wikipedia.org/wiki/Alpha_to_coverage

EQAA

http://http.developer.nvidia.com/GPUGems3/gpugems3_ch04.html

to be continued....

Alpha_to_coverage

This technique uses the alpha channel of textures as a coverage mask for anti-aliasing.

Alpha to coverage multisampling is based on regular multisampling, except that the alpha coverage mask is ANDed with the multisample mask. Alpha-to-coverage converts the alpha component output from the pixel shader to a coverage mask. When the multisampling is applied each output fragment gets a transparency of 0 or 1 depending on alpha coverage and the multisamplingresult.

alphatocoverage 采样技术是基于常规的采样技术,除了alpha coverage mask是和采样mask进行与(and)运算。atc把alpha分量从ps输出到coverage mask。多重采样依据这个alpha coverage 与 多重采样的结果

alpha 被当做mask 管线中会根据alpha的mask来采样

这样明显无法同时实现一个透明功能和 mask功能

Unlike alpha blending, alpha to coverage is order independent, so leaves and fronds do not need to be sorted by depth to achieve a correct image.

Alpha-To-Coverage

Alpha-to-coverage is a multisampling technique that is most useful for situations such as dense foliage where there are several overlapping polygons that use alpha transparency to define edges within the surface.

You can use the AlphaToCoverageEnable member of D3D11_BLEND_DESC1 or D3D11_BLEND_DESC to toggle whether the runtime converts the .a component (alpha) of output register SV_Target0 from the pixel shader to an n-step coverage mask (given an n-sample RenderTarget). The runtime performs an AND operation of this mask with the typical sample coverage for the pixel in the primitive (in addition to the sample mask) to determine which samples to update in all the active RenderTargets.

If the pixel shader outputs SV_Coverage, the runtime disables alpha-to-coverage.

Note  In multisampling, the runtime shares only one coverage for all RenderTargets. The fact that the runtime reads and converts .a from output SV_Target0 to coverage when AlphaToCoverageEnable is TRUE does not change the .a value that goes to the blender at RenderTarget 0 (if a RenderTarget happens to be set there). In general, if you enable alpha-to-coverage, you don't affect how all color outputs from pixel shaders interact with RenderTargets through the output-merger stage except that the runtime performs an AND operation of the coverage mask with the alpha-to-coverage mask. Alpha-to-coverage works independently to whether the runtime can blend RenderTarget or whether you use blending onRenderTarget.

Graphics hardware doesn't precisely specify exactly how it converts pixel shader SV_Target0.a (alpha) to a coverage mask, except that alpha of 0 (or less) must map to no coverage and alpha of 1 (or greater) must map to full coverage (before the runtime performs an AND operation with actual primitive coverage). As alpha goes from 0 to 1, the resulting coverage should generally increase monotonically. However, hardware might perform area dithering to provide some better quantization of alpha values at the cost of spatial resolution and noise. An alpha value of NaN (Not a Number) results in a no coverage (zero) mask.

Alpha-to-coverage is also traditionally used for screen-door transparency or defining detailed silhouettes for otherwise opaque sprites.

alphatocoverage 和alpha blend是独立的

http://msdn.microsoft.com/ZH-CN/library/windows/desktop/bb205072(v=vs.85).aspx#Alpha_To_Coverage

---------------------------

ccording to the OpenGL GL_ARB_multisample specification

http://en.wikipedia.org/wiki/Multisample_anti-aliasing

--------------------------------------

gl 实现 msaa --FBO

http://blog.csdn.net/xiajun07061225/article/details/7690805

--------------------

http://www.cnblogs.com/mikewolf2002/archive/2012/11/24/2785441.html

coverage aa

http://www.cnblogs.com/mikewolf2002/archive/2012/11/22/2783235.html

http://www.cnblogs.com/gongminmin/archive/2011/05/16/2047506.html

如图1的情况,没有centric插值的话,蓝色三角形的两个采样点将都得到纯蓝的颜色(外差而得),最终像素的颜色就是(2 * (0, 0, 1) + 14 * (1, 1, 0)) / 16 = (0.875, 0.875, 0.125)。有centric插值的话就是个更正确的浅蓝色((1, 1, 1) + (0.77, 0.77, 1)) / 2 = (0.885, 0.885, 1),最终像素颜色是(2 * (0.885, 0.885, 1) + 14 * (1, 1, 0)) / 16= (0.98, 0.98, 0.125)。如下图所示:

性能统计:每个像素里PS执行次数为每个覆盖到该像素的三角形一次,占用空间N个color + N个depth。

---

这段看了很多遍才懂,结合mike

有centric的情况下

蓝色三角形在这个pix算一次 ps   ((1, 1, 1) + (0.77, 0.77, 1)) / 2 = (0.885, 0.885, 1)

黄色三角形在这pix算一次ps (1, 1, 0)

两者加权平均

MSAA的更多相关文章

  1. D3D11中的MSAA

    这两年我的工作都转到了D3D11,目前新出硬件几乎全部支持此标准,加上D3D11接口清晰,概念直观,等到windows7普及,想必未来都是D3D11的天下.最近时间较空,我陆续开始写些基础文章,希望对 ...

  2. depthstencil buffer 不支持 msaa

    phyreengine dx11 MRT不支持 depth rendertarget 的msaa 他里面竟然只写着,// not supported yet !!!! 导致hdao 时开msaa的话, ...

  3. MSAA, UIA brief explanation

    MSAA, UIA brief explanation 2014-07-24 Reference [1] MSAA, UIA brief explanation [2] Testing Tools [ ...

  4. PhyreEngine3.8 MSAA resolution

    There is something wrong in PhyreEngine 3.8 to fullfill MSAA, actually, I think it is eqaa You have ...

  5. 深入剖析MSAA

    本文打算对MSAA(Multisample anti aliasing)做一个深入的讲解,包括基本的原理.以及不同平台上的实现对比(主要是PC与Mobile).为了对MSAA有个更好的理解,所以写下了 ...

  6. FXAA,FSAA与MSAA有什么区别?效果和性能上哪个好

    而MSAA基本上只对画面中物体的边缘进行放大.混合的抗锯操作,因为边缘是锯齿最明显的地方(注意不是所有的边缘).提取边缘,主要是结合深度技术.MSAA是种硬件AA.我们一般说的4x.8x,就是放大倍数 ...

  7. 基于MSAA的QQ界面信息获取的实现

    主要技术(Microsoft Active Accessibility)讲解: 以下是微软对于此技术的说明 Microsoft Active Accessibility Version 2.0 Pur ...

  8. deferred rendering with msaa

    https://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/d3d_samples/antialiasedde ...

  9. wpf C# 操作DirectUI窗口 SendMessage+MSAA

    原文:wpf C# 操作DirectUI窗口 SendMessage+MSAA 最近做一个抓取qq用户资料的工具,需要获取qq窗口上的消息,以前这种任务是用句柄获取窗口中的信息,现在qq的窗口用的是D ...

随机推荐

  1. 第一个Cocos2d-JS游戏

    我们的编写的第一个Cocos2d-JS程序,命名为HelloJS,从该工程开始学习其它的内容.创建工程我们创建Cocos2d-JS工程可以通过Cocos2d-x提供的命令工具cocos实现,但这种方式 ...

  2. 工作单元(Unit of Work)

    维护受业务事务影响的对象列表,并协调变化的写入和并发问题的解决. 从DB中存取Data时,必须记录增删改动作,以将对DB有影响的数据写会到DB中去. 如果在每次修改对象模型时就对DB进行相应的修改,会 ...

  3. ubuntu 12.04 安装 codeblock 12.11

      原文地址:http://qtlinux.blog.51cto.com/3052744/1136779 参考文章:http://blog.csdn.net/dszsy1990/article/det ...

  4. 济南学习 Day 3 T3 pm

    仙人掌(cactus)Time Limit:1000ms Memory Limit:64MB题目描述LYK 在冲刺清华集训(THUSC) !于是它开始研究仙人掌,它想来和你一起分享它最近研究的结果. ...

  5. Codevs 1474 十进制转m进制

    时间限制: 1 s    空间限制: 128000 KB    题目等级 : 白银 Silver 题目描述 Description 将十进制数n转换成m进制数 m<=16 n<=100 输 ...

  6. silverlight 用户浏览器未安装SL插件问题

    1.在Silverlight启动页面 <%@ Page Language="C#" AutoEventWireup="true" %> <!D ...

  7. C#操作系统日志

    系统日志可以帮助我们分析操作系统的安全与否,也可以帮助我们将一些不好调试的信息显示出来. C#操作系统日志主要是通过EventLog类来实现的. 一 图解 打开事件查看器,其中与EventLog类对应 ...

  8. Geoserver 相关学习

    参考资料: http://geoserver.org/ http://docs.geoserver.org/ 相关文档 http://docs.geoserver.org/stable/en/user ...

  9. JavaScript创建对象的写法

    JavaScript 有Date.Array.String等这样的内置对象,功能强大使用简单,人见人爱,但在处理一些复杂的逻辑的时候,内置对象就很无力了,往往需要开发者自定义对象.   对象是什么 从 ...

  10. Delphi XE5教程9:基本语法元素

    内容源自Delphi XE5 UPDATE 2官方帮助<Delphi Reference>,本人水平有限,欢迎各位高人修正相关错误!也欢迎各位加入到Delphi学习资料汉化中来,有兴趣者可 ...