Anti-aliasing

From Valve Developer Community
< Zh
Revision as of 20:17, 6 March 2025 by Mou7s (talk | contribs)
Jump to navigation Jump to search
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)中文 (zh)Translate (Translate)
Comparison of no anti-aliasing and 8x MSAA. Click to enlarge

反锯齿(英语:anti-aliasing,简称AA)是一种图形技术,广泛应用于 Valve开发的视频游戏(如半衰期系列)以及其他软件产品(包括 Steam Steam平台和 起源电影制作器 起源电影制作器等)。该技术通过消除计算机生成图像中的锯齿边缘,有效提升画面的视觉质量。

计算机显示器本质上是由大量可设置任意颜色或亮度的正方形像素构成的网格。正因为如此,显示器无法绘制出一条绝对笔直的线条 —— 无论像素数量有多少,都无法形成完全平滑的对角线。这种现象会导致阶梯状边缘伪影的出现,且分辨率越低,这种锯齿现象就越明显,这在视频游戏领域通常被称为走样(Aliasing)Wikipedia icon 反锯齿,旨在解决走样问题。简而言之,反锯齿技术通过平滑图像中的阶梯状边缘伪影,减少图像的像素感,同时不改变最终图像的分辨率。

反锯齿技术在 PC 平台已实现成熟应用,但主机领域长期受限于硬件架构,直至 传送门2PlayStation 3版首次引入 MLAA 形态学反锯齿)的问世才实现主机平台反锯齿技术的突破。传统反锯齿方案(如 MSAA 多重采样反锯齿)因需对每个像素进行多次采样,导致计算资源消耗极大;而后期游戏采用的后处理反锯齿技术(如 FXAA 快速近似反锯齿、TAA 时间性反锯齿、MLAA 形态学反锯齿)通过算法优化,在保持相近画质的前提下显著降低计算开销。值得注意的是, Xbox 360平台基于 起源2007开发的游戏均采用基于帧缓冲的软件反锯齿方案(Software AA),其边缘平滑效果与现代后处理反锯齿技术存在代际差距。

概述

传统反锯齿方法

  • 与后处理反锯齿方法相比,能恢复丢失的细节并呈现更清晰锐利的效果
  • 比后处理反锯齿方法更性能要求更高 (SSAA 比 MSAA 性能需求更高,但能产生更优效果)
  • 大多数较新游戏(采用延迟渲染器)不支持这些反锯齿方法
  • 仅 MSAA 特性: 若未启用 alpha to coverage(en),则不会对透明纹理应用反锯齿

超级采样反锯齿 (SSAA)

Wikipedia icon SuperSampling Anti-Aliasing, 在某些游戏中也被称为 全场景反锯齿(FSAA) 通常与术语 降采样(downscaling)混用。

  • 严格来说,正确实现时两者存在差异:降采样作用于整个帧缓冲(包含 2D 和 3D 元素),而 SSAA/MSAA(超级采样反锯齿 / 多重采样反锯齿)仅对 3D 元素进行内部处理。这种实现方式可能带来较小的性能影响和更好的兼容性。

与多重采样反锯齿(MSAA)相比,超级采样反锯齿(SSAA)/ 全场景反锯齿(FSAA)能产生与 MSAA 相同的反锯齿效果,但可彻底消除 alpha 纹理中的阶梯状图案,并使容器道具上的透明文字更少模糊。此外,ReShade 深度缓冲检测功能与 SSAA 兼容。然而,尽管 SSAA 能提供极高画质,但其性能消耗远(en)于 MSAA,且 Source 引擎默认未开放 SSAA 选项,但可通过以下方式启用:

在 NVIDIA 显卡上,此技术是以 OGSSAA(有序网格超级采样反锯齿)的形式实现的,并且只能借助第三方应用程序来开启,例如 Pcgw icon.png Nvidia Profile Inspector,可使用以下模式:2x1、1x2、2x2、3x3、4x4。此外,OGSSAA 仅支持 Direct3D API。

Icon-Important.png重要: 如果您正在构建立方体贴图(cubemaps),通过驱动程序级别启用反锯齿(如超级采样反锯齿(SSAA)/ 有序网格超级采样反锯齿(OGSSAA)/ 降采样,或强制驱动级多重采样反锯齿(MSAA))将导致立方体贴图(尤其是 HDR 立方体贴图)生成速度非常缓慢(即使在高性能 Wikipedia icon 图形处理器 上)。在构建立方体贴图前,请务必禁用 SSAA(或 OGSSAA)或驱动级 MSAA。若在游戏内启用 MSAA 则不受此问题影响。

降采样反锯齿

降采样(Downscaling)或下采样(Downsampling)是一种暴力抗锯齿方法,通过以更高分辨率运行游戏,对 2D 元素(如 HUD(en) 和 UI)和 3D 元素同时应用超级采样抗锯齿(SSAA)。可通过显卡控制面板启用 NVIDIA DSRAMD VSR 实现该技术。与 SSAA 不同,降采样会导致画面轻微模糊,且无法消除透明纹理 / 物体上的闪烁现象。

另一个降采样的缺点是,许多较老游戏的 UI(如 VGUI(en))在更高分辨率下会变得更小。不过,近期半衰期2半衰期2:死亡竞赛(均自 20 周年更新起)以及军团要塞2已更新支持 VGUI 在高分辨率下正确缩放。而自求生之路起的所有游戏均能在 4K 或更高分辨率下正确缩放 UI(例外是求生之路中的 隐藏式字幕(en) 功能不缩放,但求生之路2及后续作品已修复此问题)。

多重采样反锯齿 (MSAA)

Wikipedia icon MultiSample Anti-Aliasing 曾是游戏行业抗锯齿技术的黄金标准(直到 2010 年代中后期,随着游戏开发从正向渲染转向延迟渲染架构,时间性抗锯齿 TAA 逐步取代其地位)。作为历史产物,在 反恐精英:全球攻势 反恐精英:全球攻势 发布前,所有基于 起源 起源 引擎的游戏仅支持 MSAA 抗锯齿(NVIDIA Maxwell 架构前的显卡还可通过 CSAA 技术实现增强型抗锯齿)。直到 2013 年 金源 金源 推出时,才首次引入 MSAA 4x 模式并设置为默认启用状态。在该游戏中,玩家可通过添加 -nomsaa 启动参数禁用抗锯齿功能。从技术原理来看,当多边形边缘跨越子像素采样点时,MSAA 会检测该像素周围多个采样点的相交情况,通过混合多边形颜色与背景色,实现边缘的平滑过渡。这种技术虽然能显著改善锯齿现象(尤其对未启用 alpha 覆盖(en) 的透明纹理效果更佳),但无法彻底消除阶梯状边缘。若要实现完全平滑的画面效果,需结合 FXAA/SMAA 等后处理抗锯齿技术。值得注意的是,采用 deferred rendering(en) 技术的游戏若同时启用 MSAA,可能引发渲染异常或兼容性问题。不过对于主流玩家群体而言,MSAA 仍能提供可接受的视觉体验。

所有基于金源引擎(GoldSrc)、起源引擎(Source)和起源 2 引擎(Source 2)的游戏均提供三种 MSAA 抗锯齿设置:

  • 2x
  • 4x - 自 SteamPipe(en) 后的 金源 金源 默认级别(可在显卡控制面板中增强),同时也是 半衰期2 20 周年纪念版后的默认设置
  • 8x - 对老旧 / 低端硬件资源消耗 极高(en) 。该模式于起源引擎 2006 版首次引入。玩家可通过在起源引擎 2004 版中输入 mat_antialias 8 控制台命令强制启用,或通过显卡驱动设置强制开启。[1]

What this does is add more subpixels to a specified location and increases the accuracy of the multisampling, at the cost of performance. Some alternative anti-aliasing methods such as the post-processing one will be less demanding compared to MSAA or other methods.

Warning.png警告:If MSAA is enabled, ReShade depth buffer detection will stop working, which means that you are unable to use some AA methods, for example (such as some versions of TAA), or even shaders such as SSAO in general.
Note.png注意:Previous version of engine branch, 起源2004 起源2004, has an option for MSAA 6x. This setting of MSAA does not work on modern graphics cards or newer drivers, and was replaced by MSAA 8x.
Note.png注意:Alpha to coverage(en) requires MSAA, as it is a multisampling method. Alternatively, SSAA or SGSSAA (the latter is MSAA combined with transparency SSAA) can be used instead to reduce jagged edges on alpha textures and objects.

超级全局采样反锯齿 (SGSSAA)(含透明反锯齿)

(存在于 Nvidia 之中) SGSSAA, short for Sparse Grid Super-Sampling Anti-Aliasing is a improved version of SSAA (or OGSSAA), using MSAA and TrSSAA (for transparent textures without alpha to coverage), to apply anti-aliasing to the image. Enabling this method requires third-party application such as NVIDIA Profile Inspector, plus change the "Antialiasing - Compatibility (DX9)" flag and LOD bias to allow SGSSAA to work, produce good results and makes distant texture looks significantly sharper (compared to NVIDIA DSR), it also produces more detail than OGSSAA (or regular SSAA), and transparent textures will look better than using alpha to coverage(en) (which creates noticeable dithering when looking closer).

Note.png注意:When using SGSSAA, make sure the in-game MSAA option is turned off (if you choose to override the AA settings in GPU drivers control panel/NVIDIA Profile Inspector), or if you enable transparency AA (forced through GPU drivers) while having in-game MSAA option enabled, make sure alpha to coverage is disabled (using mat_alphacoverage 0) to avoid some transparent textures shimmering due to SGSSAA conflicting with alpha to coverage.
Note.png注意:All 军团要塞2分支 games (反恐精英:起源, 胜利之日:起源, 半衰期2:死亡竞赛 and 半衰期死亡竞赛:起源), now have different executable name, and also had a 64-bit executable (cstrike_win64.exe, dod_win64.exe, etc.), so you will need to add the new executable name into driver profile first (in Nvidia Profile Inspector), before you can use SGSSAA anti-aliasing.

To enable SGSSAA in 半衰期2 (including it's episodes), and 半衰期:起源, you will need to select "Half-Life 2" profile on NVIDIA Profile Inspector and change it settings here. To enable SGSSAA on any other Source games sharing hl2.exe executable name, select "Half Life: Source"[sic].

Game Flag
All LOD Bias: Set Negative LOD to "Allow", then set the following value:
2xSGSSAA (2 samples): -0.5 (or -0.375)
4xSGSSAA (4 samples): -1.0 (or -0.875)
8xSGSSAA (8 samples): -1.5 (or -1.375)
起源2004 - 起源2013 0x000000C1
0x004000C1 (if ReShade is used)
0x004010C1 (传送门)
求生之路 引擎分支 and above 0x000000C0
0x004000C0 (if ReShade is used)
0x004010C0 (传送门2)

覆盖采样反锯齿 (CSAA)[已弃用] Nvidia

Coverage Sampling Anti-Aliasing (CSAA) was an NVIDIA-exclusive method of anti-aliasing, introduced with the GeForce 8 Series. It aims to further reduce the additional stress that MSAA puts on the system, with NVIDIA claiming that a CSAA-rendered image will rival 8x-16x MSAA while only putting a load on the system comparable to 4x MSAA. It does this by reducing the number of settings each sample determines (by creating a new sample for coverage) while increasing the overall number of samples.

However, by the release of Maxwell-based GPUs such as GTX 750 Ti, GTX 800M/900 series in 2014, and newer NVIDIA graphics card (or drivers released around Feb 2014 onwards which affects GeForce 400 series card and above) drops support for CSAA completely, and Multi-Frame Anti-Aliasing (MFAA) completely succeeded it. However, MFAA may comes with limitations such as disabling D3D11 Driver Command Lists, killing multi-threaded rendering in DX11 Source games (and thus performance when CPU-limited), and FPS lower than 40 will cause smearing and blurring when in motion (similar to TAA). MFAA also only works with D3D10 or later.

起源 起源 natively support CSAA since 起源2007 起源2007. Support for CSAA was removed since Maxwell and later NVIDIA cards.[2]

There are 3 different settings of CSAA, which include:

  • 8x (MSAA 4x performance)
  • 16x (MSAA 4x performance)
  • 16xQ (MSAA 8x performance)
Note.png注意:CSAA 8xQ is MSAA 8x.

后处理反锯齿方法

  • Produces blurrier result and does not restore missing details compared to traditional methods
  • Cheap(en), with little to no performance loss compared to traditional methods
  • Only available on 起源2007 (Software AA), 反恐精英:全球攻势 (FXAA), but it can be easily implemented to any game using Source shader editor(en) or ReShade.
  • Does apply anti-aliasing to all transparent textures.

软件反锯齿

(存在于自 起源2007 以来) All Source engine games since 起源2007 introduced software AA, which blurs the jagged edges (similar to FXAA or other post-processing AA). It currently only works on Source 2007 games (tested on 黑山 2012/mod version). Software AA is also supported (and used) in Xbox 360 port of Source engine games. Unlike other anti-aliasing, this can be only toggled through console commands (mat_software_aa_strength).

Icon-Bug.png错误:Software AA is currently broken in all 起源2009, 起源2013 games. It is also broken (or non-functional) in 求生之路 引擎分支[3] and above.
This bug does not apply to console port, however (confirmed on Postal III cancelled Xbox 360 port which run on 起源2009).  (tested in: 半衰期2, 传送门, 求生之路 引擎分支, 传送门 2 引擎分支, Source SDK 2013.)

快速近似反锯齿 (FXAA)

Wikipedia icon Fast Approximate Anti-Aliasing (FXAA) is a post-processing anti-aliasing with a very low performance cost. The main advantage of this technique over regular anti-aliasing is that it doesn't require a lot of computing power, and is also capable of smoothing out alpha-blended textures (aka transparent textures). Its main drawback is that it blurs the final image, so textures will look less sharp, and plus, they don't recover the missing pixel (or alpha to coverage(en)) without using FXAA with MSAA simultaneously (or by downscaling). Regular 起源 起源 (prior to CS:GO 引擎分支 CS:GO 引擎分支, or in third-party engine branch such as Xengine Xengine) doesn't have support for it but as FXAA is a post-processing effect, it can easily be implemented like with the Source shader editor(en) or with ReShade.

Icon-Important.png重要:Using ReShade for multiplayer games and connecting to a VAC-secured server is not recommended.
Additionally, using ReShade on 反恐精英:全球攻势 and 反恐精英2 requires the -allow_third_party_software and -insecure command-line options, which would prevent you from connecting to any VAC-secured server.

形态学反锯齿 (MLAA)

Wikipedia icon Morphological Anti-Aliasing (MLAA) is a post-processing anti-aliasing typically available on AMD cards, but it can be used with any other graphics card. It's similar to NVIDIA's FXAA but has a higher performance cost, but is less demanding compared to MSAA. It's used in PlayStation 3 PlayStation 3 version of 传送门2.

证实:What about 反恐精英:全球攻势 反恐精英:全球攻势 on PS3?

稀疏形态反锯齿 (SMAA)

Subpixel Morphological Anti-Aliasing (SMAA) works similarly to FXAA or MLAA (which is what SMAA was based off), but results in much better image quality than both FXAA and MLAA, while also taking little performance impact. There are currently no 金源, 起源 or 起源2 games using this AA method, but users can add SMAA by using ReShade or Source Shader Editor(en).

保守形态反锯齿(CMAA)

Wikipedia icon Conservative Morphological Anti- Aliasing (CMAA) 最初是由英特尔公司的 Filip Strugar 开发的一种基于图像的后处理技术. CMAA 通过以下四个主要步骤减少锯齿:

  • 色彩断层检测
  • 局部主导边缘检测
  • 简单形状处理
  • 对称长边缘形状处理

与 FXAA 相比,CMAA 虽然会产生轻微性能影响,但仍比 SMAA 对性能影响更小。它能在保留文本细节且不造成几何体过度模糊的前提下,实现高质量反锯齿效果。

CMAA目前仅在反恐精英2 反恐精英2中实现.

Note.png注意:反恐精英:全球攻势 反恐精英:全球攻势 被移植到起源2 起源2(并更名为 反恐精英2 反恐精英2)时,游戏不再支持快速近似反锯齿(FXAA),转而采用保守形态反锯齿(CMAA),并且不能再将其与多重采样反锯齿(MSAA)搭配使用。

时间反锯齿方法

  • While producing result similar to SSAA, TAA/TSSAA restore missing details by jittering the image which combines the information from past and current frames, while TXAA restore missing details by using MSAA.
  • Temporal methods, when in motion, also produces blurrier image and create ghosting effect noticable with lower framerate and/or resolutions.
  • Like post-processing methods, cheap(en), with little to no performance loss compared to traditional methods
  • Only available in 泰坦陨落 引擎分支, but it can be easily implemented to any game using Source shader editor(en) or ReShade.
  • Does apply anti-aliasing to all transparent textures.

时间性反锯齿 (TAA/TSSAA)

Wikipedia icon Temporal Anti Aliasing (TAA) is an anti-aliasing technique that reduces shimmering or flickering effects by smoothing the frame when in motion. There are multiple implementations of TAA, but the most common one is TSSAA (Temporal Super-Sampling Anti-Aliasing) which combines information from past frames (usually 8 frames) and the current frame, while also slightly jittering to smooth the current frame. Each pixel is sampled once per frame but in each frame the sample is at a different location within the pixel. Pixels sampled in past frames are blended with pixels sampled in the current frame to produce an anti-aliased image. While being cheaper to calculate than MSAA, and produces image similar to super sampling anti-aliasing (SSAA) or downscaling, its main drawback is that it can cause ghosting and blurriness to the image, especially when in motion, noticeable with lower framerate or resolution, depending on the implementation (Example here). Some of the drawbacks can be mitigated by adding a sharpening filter.

As of mid 2010s, it's the current gaming industry standard of anti-aliasing (alongside FXAA(en) for weaker hardware) with many modern games (except many VR and mobile games) started to use TAA as most modern games transitioned from forward rendering to deferred rendering, which allows many lights to be rendered without a significant performance hit, and because MSAA is harder to implement on deferred rendering yet produce worse result than games using forward rendering, and some games use TAA to hide dithering effect (such as SSAO or ray tracing).

Apex Legends Apex Legends as well as Titanfall 2 Titanfall 2 are the only Source(en) games that uses TSSAA, while Titanfall uses TXAA which requires MSAA to function. Portal with RTX and all other RTX Remix(en) games also use TSSAA anti-aliasing, through DLSS (or DLAA). One upcoming Source 2 game made by Valve(en), Deadlock, supports TAA through AMD FSR2, FSR 3 and Nvidia DLSS 4.0 (or DLAA). Both DLSS, XeSS and FSR 2.0 (and later) not only apply TAA anti-aliasing (using AI/Tensor Cores), but also improve performance by rendering the image at lower resolutions then scaling to higher resolutions.

时间性超级采样反锯齿 (TXAA)

TXAA is an older form of TAA that creates a smoother image by combining MSAA with Nvidia Nvidia-designed temporal filters. TXAA is supported with Nvidia GeForce GTX 600 series or higher, and requires MSAA to be enabled in order to use.

媒体

Tip.png提示:Click on one of the images below, after it's fully loaded, click on it again to view it in full resolution.

金源

FXAA (through ReShade)
SMAA (through ReShade)
4x MSAA (default)
No MSAA

起源

特写

This image shows how each anti-aliasing methods affect text, details, transparent textures (both non-alpha to coverage and alpha to coverage).

No anti-aliasing
2x MSAA
4x MSAA
8x MSAA
FXAA through ReShade
SMAA through ReShade
SGSSAA (8x MSAA with 8x Transparency MSAA, TrMSAA for short), transparent text and some transparent textures are fully detailed, and less aliasing.
SSAA 4x4 (similar result to SGSSAA, but more demanding)

软件反锯齿

No anti-aliasing
Software AA - Strength 1 (mat_software_aa_strength 1)
Software AA - Strength 4 (mat_software_aa_strength 4)

黑山

Multisampling
No anti-aliasing (Click to enlarge)
2x MSAA (Click to enlarge)
4x MSAA (Click to enlarge)
8x MSAA (Click to enlarge)
Post-processing
FXAA through ReShade (Click to enlarge)
FXAA through ReShade, in conjunction with 8x MSAA.
This produces a very good result without downscaling/SSAA which reduces performance, but at the cost of making the image blurrier, unless a sharpening filter is also used. It's also the default AA settings in CS:GO when launching for the first time.
SMAA through ReShade (Click to enlarge)
SMAA through ReShade, in conjunction with 8x MSAA. (Click to enlarge)
Similar to FXAA with 8x MSAA, except less blurrier image.
Supersampling
SGSSAA (Click to enlarge)
Produce good result, with the jagged edges on the towers completely gone, at the cost of performance.
SSAA (or OGSSAA) 4x4 (Click to enlarge)
Similar to SGSSAA but used ordered grid.
16xS (SSAA 2x2 & MSAA 4X) (Click to enlarge)
Similar to SSAA 4x4, although less demanding.
Nvidia DSR, producing SSAA-like result.

Titanfall 2

No anti-aliasing (Click to enlarge)
2x MSAA (Click to enlarge)
4x MSAA (Click to enlarge)
8x MSAA (Click to enlarge)
Temporal AA / TSSAA(Click to enlarge)

起源2

待完善: Add screenshots.

支持情况

金源 金源

Game FXAA MSAA TAA
半衰期 半衰期
半衰期:争锋相对 半衰期:争锋相对
半衰期:蓝色行动 半衰期:蓝色行动
反恐精英 反恐精英
胜利之日 胜利之日
Ricochet Ricochet
军团要塞 经典 军团要塞 经典
死亡竞赛 经典 死亡竞赛 经典
反恐精英:零点行动 反恐精英:零点行动
零点行动 关卡模式 零点行动 关卡模式
No Yes (since 2013 engine update, 4X only) No
詹姆斯·邦德007:夜火 詹姆斯·邦德007:夜火 No Yes
(up to 8X)
No

起源 起源

Anti-aliasing types Post-processing Spatial Temporal
Game FXAA MLAA Software AA MSAA CSAA (NVIDIA) EQAA (AMD) TAA
起源2004 起源2004 No No N/A 2x, 4x, 6x No No No
起源2006 起源2006 No No N/A 2x, 4x, 8x Older NVIDIA GPUs/drivers only No No
起源2007 起源2007 No No Always enabled Xbox 360
Disabled by default (PC)
2x, 4x, 8x Older NVIDIA GPUs/drivers only No No
起源2009 起源2009/起源 多人分支 起源 多人分支
起源2013 起源2013
异形丛生 引擎分支 异形丛生 引擎分支
Alien Swarm: Reactive Drop Alien Swarm: Reactive Drop
求生之路 引擎分支 求生之路 引擎分支
No No Always enabled Xbox 360
Broken/non-functional (PC)
2x, 4x, 8x Older NVIDIA GPUs/drivers only No No
传送门 2 引擎分支 传送门 2 引擎分支
Portal 2: Desolation Portal 2: Desolation[证实]
No Yes (PlayStation 3) Non-functional (PC)
Replaced by MLAA? (Xbox 360[证实])
Replaced by MLAA (PlayStation 3)
2x, 4x, 8x Older NVIDIA GPUs/drivers only
Can be only enabled using mat_aaquality.
CSAA options removed from menu.
No No
CS:GO 引擎分支 CS:GO 引擎分支 Yes No Non-functional, replaced by FXAA. 2x, 4x, 8x Older NVIDIA GPUs/drivers only
Can be only enabled using mat_aaquality.
CSAA options removed from menu.
No No
Dota 2 Dota 2 (pre-Reborn) Yes No No Can be enabled through console,
but breaks deferred renderer
Same as MSAA. No No
黑山 黑山 Yes No 2012 mod only Removed (post-Xen update)
Available on previous versions (2012 mod/pre-Xen)
Removed (post-Xen update)
Available on previous versions (2012 mod/pre-Xen)
No No
Consortium(en) Yes No No No No No No
地层起源 地层起源 Yes No No 2x, 4x, 8x Unknown[证实] No No
Titanfall Titanfall No No No 2x, 4x, 8x Up to 16xQ 2x, 4x, 8x TXAA
Titanfall 2 Titanfall 2 No No No 2x, 4x, 8x No[证实] 2x, 4x, 8x TSSAA
Also support Adaptive Supersampling (requires TSSAA)
Apex Legends Apex Legends No No No No No No TSSAA
Also support Adaptive Supersampling (requires TSSAA)
Portal with RTX Portal with RTX
(and other RTX Remix(en) games)
No No No No No No DLSS/DLAA

起源2 起源2

Game FXAA MSAA TAA CMAA
Deadlock Deadlock Yes No Yes
(FSR 2/FSR 3/DLSS 4/DLAA)
No
反恐精英2 反恐精英2 No 2x, 4x, 8x No Yes
半衰期:爱莉克斯 半衰期:爱莉克斯 No Always enabled (MSAA 4X) No No
S&box S&box No Always enabled
(Can be adjusted from 2X to 8X)
No No
Dota 2 Dota 2 Yes No No No

性能影响

Note.png注意:All performance test below were done on an NVIDIA GeForce RTX 3060, running with uncapped FPS (Source games are capped at 300 by default), highest possible graphical settings, VSync disabled.

Below is the performance impact of each AA method. Most modern mid-range and high-end GPUs are capable of 8x MSAA with no performance loss, and over 60-100 FPS in Source games, as they are capped at 300 FPS by default.

Game None FXAA SMAA MSAA SSAA TAA[4]
半衰期2:失落的海岸线 半衰期2:失落的海岸线 (benchmark) 569.23 Avg FPS 549.88 Avg FPS
(Negligible)
533.28 Avg FPS
(Very Low)
547.00 Avg FPS (2x)
(Low - Moderate)
520.89 Avg FPS (4x)
(Moderate)
475.34 Avg FPS (8x)
(Moderate - High)
409.26 Avg FPS (2x2)
(Very High)
329.32 Avg FPS (2x2 + MSAA 4X/SGSSAA)
(Very High)
147.74 Avg FPS (4x4)
(Very High)
TSSAA: Similar to SMAA or FXAA
TXAA: Similar as MSAA

控制台命令

Source 引擎

MSAA/CSAA

起源2013 起源2013 games and older Source engine games have these console commands dedicated to anti-aliasing:

mat_antialias (0-8)
Goes from 0x to 8x MSAA.
Note.png注意:This command only accepts positive values, negative ones will do nothing. 6x MSAA is not supported on 起源2006 and newer graphics card/GPU drivers.
This command also does nothing in 黑山 (since Xen update) as MSAA has been removed. MSAA is still available on previous versions of Black Mesa.
On 起源2004 起源2004 (which only supports up to 6x officially), 8x MSAA can be enabled by using this command, but once you quit the game, it will reset to 4x MSAA.
mat_aaquality (0-4)
It was used to set CSAA anti-aliasing settings. CSAA needs MSAA to produce the correct result. 8x and 16xQ is "mat_aaquality 2", 16x is "mat_aaquality 4".
Note.png注意:Since the release of Nvidia Nvidia's GTX 900 series cards (as well as GTX 750, 750Ti and other Maxwell-based cards) and newer, support for CSAA has been removed! So this command does nothing.

软件反锯齿

Note.png注意:All Source engine games (since 起源2007) have software AA. It currently only works on Source 2007 games (黑山 2012 version tested).

Software AA is also supported (and used) in Xbox 360 port of Source engine games.

Icon-Bug.png错误:Software AA is currently broken in all 起源2013 games. It's also broken (or non-functional) in 求生之路 引擎分支[3] and above.  (tested in: 半衰期2, 传送门, 求生之路 引擎分支, 传送门 2 引擎分支, Source SDK 2013.)
mat_software_aa_blur_one_pixel_lines (0-1)
How much software AA should blur one-pixel thick lines: (0.0 - none), (1.0 - lots)
Default: 0.5
mat_software_aa_debug (0-3)
Software AA debug mode: (0 - off), (1 - show number of 'unlike' samples: 0->black, 1->red, 2->green, 3->blue), (2 - show anti-alias blend strength), (3 - show averaged 'unlike' colour)
Default: 0
mat_software_aa_edge_threshold (value)
Software AA - adjusts the sensitivity of the software AA shader's edge detection (default 1.0 - a lower value will soften more edges, a higher value will soften fewer)
Default: 1.0
mat_software_aa_quality (0-1)
Software AA quality mode: (0 - 5-tap filter), (1 - 9-tap filter)
Default: 0
mat_software_aa_strength (0-4)
Software AA - perform a software anti-aliasing post-process (an alternative/supplement to MSAA). This value sets the strength of the effect: (0.0 - off), (1.0 - full)
Note.png注意:This can be set up to "4", but will cause dithering to be more visible around the edges.

Default: 0.0 (PC), 1.0 (Xbox 360)
mat_software_aa_strength_vgui (0-1)
Same as mat_software_aa_strength, but forced to this value when called by the post vgui AA pass.
Default: 1.0 (PC), 2.0 (Xbox 360)
mat_software_aa_tap_offset (value)
Software AA - adjusts the displacement of the taps used by the software AA shader (default 1.0 - a lower value will make the image sharper, higher will make it blurrier)
Default: 1.0

Source 2 引擎

反恐精英2 反恐精英2 only:

r_csgo_cmaa_enable (0-1)
Enable CMAA2.
r_csgo_cmaa_extra_sharp (0-1)
Enable sharpening when CMAA2 enabled.
Note.png注意:Doesn't seems to have any noticeable differences.
r_csgo_cmaa_quality (0-3)
Adjust CMAA2 quality from Off, Low, Medium, and High.

相关条目

外部链接

参考文献

参考文献
1. User:leonidakarlach - (June 4, 2024). MSAA 8X can be enabled in Source 2004 using mat_antialias 8. And there was a difference. But once you quit the game, it will reset to MSAA 4X..
3. User:leonidakarlach - (October 18, 2024). In Left 4 Dead (and L4D2), all commands related to Software AA are hidden, but using SourceMod(en) will allow you to access the commands..
4.
Note.png注意:There are multiple variants of TAA. The most common one being used in many modern games (including Apex Legends and 泰坦陨落 引擎分支 games), which is TSSAA (also known as TMAA), which is also referred as TAA in general, supersamples the previous 8 frames, jittering them and combines into the current one to create smoother (but blurrier) image, it has performance impact similar to FXAA or SMAA. TXAA (Nvidia exclusive), on the other hand, combines MSAA with temporal filters which will have very similar performance impact as MSAA. TAAU and TSR, commonly found on Unreal Engine but also used in other games with different engine, aswell as upscaling solution (FSR2, FSR3, XeSS, DLSS), improves the game performance by running the game at lower resolution, then apply a temporal filter (TSSAA) to anti-alias the image, and sharpener (FSR or CAS) to make the image appeared sharper. Some other games also used a variant of FXAA or SMAA combined with temporal filter (FXAA 1TX, SMAA T2X, and so on.).
.