Shades is a collection of my updated ReShade shaders. For now only the shades_TFAA.fx shader has been updated.
- ReShade being installed and configured correctly.
- The depth buffer being available and configured correctly. (Check via DisplayDepth.fx)
- iMMERSE LAUNCHPAD or Lumenite Kernel being installed with all its dependencies. (Just install one of the two shader packs via the ReShade installer.)
- Some spatial anti-aliasing method being run either in-game or via ReShade before TFAA.
- Run the ReShade installer.
- Select your target game.
- Select the correct rendering API (DirectX 9, 10, 11, 12, OpenGL or Vulkan).
- If you already have ReShade installed for that game, select:
Update ReShade and Effects. - Toggle the checkmark on
Shades. - Click on next or continue to install.
If ReShade is already installed for that game, you can install the shaders manually by:
- Locating the game's executable
.exefile. Next to it you will find a folder named./reshade-shaderswith subfolders/Shadersand/Textures. - Download the whole repo and drop the
/Shadersand/Texturesfolders into the./reshade-shadersfolder. - In the ReShade settings add the
/Shaders/Shadesand/Textures/Shadesfolders to the "Texture Search Paths" and "Effect Search Paths" respectively.
Make sure either iMMERSE LAUNCHPAD or Lumenite Kernel is activated an ontop/before TFAA. Spatial anti-aliasing must be run before TFAA in the shader chain.
TFAA is a purely temporal anti-aliasing component, used to get the closest thing to real temporal anti-aliasing possible in a ReShade shader.
Top: SMAA · Bottom: SMAA + TFAA
TFAA does not anti-alias static edges on its own. It only accumulates signal across frames to produce a cleaner, more stable image over time. That is why spatial anti-aliasing still matters. It handles edges that stay still on screen, and on motion the best order is spatial first, then TFAA to stabilize over time.
Pair TFAA with any in-game anti-aliasing that preserves depth buffer access, or with any spatial ReShade AA shader loaded before it in the chain.
-
$\color{green}{\textsf{Post Anti-Aliasing}}$ Whatever is listed as "Post Anti-Aliasing" in the game's settings should work, as long as it does not have a temporal component. -
$\color{green}{\textsf{FXAA}}$ Fast Approximate Anti-Aliasing -
$\color{green}{\textsf{MLAA}}$ Morphological Anti-Aliasing -
$\color{green}{\textsf{CMAA}}$ Conservative Morphological Anti-Aliasing -
$\color{green}{\textsf{SMAA}}$ Subpixel Morphological Anti-Aliasing — Only ones that do not already include a temporal component- These ones make sense to use with TFAA:
-
$\color{green}{\textsf{SMAA}}$ - Original -
$\color{green}{\textsf{SMAA}}$ 1x - Same as "SMAA"
-
- These ones do not:
-
$\color{red}{\textsf{SMAA}}$ s2x - 2x Spatial supersampling -
$\color{red}{\textsf{SMAA}}$ t2x - 2x Temporal supersampling -
$\color{red}{\textsf{SMAA}}$ 4x - 2x Spatial + 2x Temporal supersampling -
$\color{red}{\textsf{Filmic SMAA}}$ 1x - 1x Temporal Filtering -
$\color{red}{\textsf{Filmic SMAA}}$ t2x - 2x Temporal supersampling + temporal filtering -
$\color{red}{\textsf{Filmic SMAA}}$ TU2x - 2x Temporal Upsampling + temporal filtering -
$\color{red}{\textsf{Filmic SMAA}}$ TU4x - 4x Temporal Upsampling + temporal filtering
-
- These ones make sense to use with TFAA:
-
$\color{red}{\textsf{MSAA}}$ Makes Depth buffer not stably accessible most of the time. -
$\color{red}{\textsf{SSAA}}$ Makes Depth buffer not stably accessible most of the time. -
$\color{red}{\textsf{NVIDIA DSR}}$ Always makes depth buffer have the wrong scale, often makes it jitter and is not stably accessible. -
$\color{red}{\textsf{TAA}}$ Already includes temporal component. Jittering depth buffer, often makes it not stably accessible. -
$\color{red}{\textsf{TUAA}}$ Already includes temporal component. Jittering depth buffer, wrong scale, often makes it not stably accessible. -
$\color{red}{\textsf{TXAA}}$ Same problems as MSAA and TAA combined
Below you can see how TFAA and SMAA can work together on edges in motion.
| Without SMAA | With SMAA | |
|---|---|---|
| Without TFAA | ![]() |
![]() |
| With TFAA | ![]() |
![]() |
The most basic version of a temporal filter as in TFAA or in well-known industry solutions like Filmic SMAA T1x consists of the following steps:
- History data is sampled for each pixel using the velocity buffer and an accumulated history buffer.
- Validate that history data is plausible and reject if not.
- Rectify history data to the neighborhood of the current frame.
- Blend new frame data with the rectified history data.
- Write blended data to the history buffer.
ReShade UI controls (runtime). Edit Description here, then run py -3 misc/sync_tfaa_tooltip.py.
UI_TEMPORAL_FILTER_STRENGTH |
Label | Range | Description |
| Temporal Filter Strength | 0–1 | Strength of the temporal filter. | |
UI_ADAPTIVE_SHARPEN |
Label | Range | Description |
| Adaptive Sharpening | 0–1 | Amount of adaptive sharpening applied to cancel out temporal blurring where necessary. | |
UI_POST_SHARPEN |
Label | Range | Description |
| Post Sharpening | 0–1 | Amount of post-sharpening applied to the whole image. | |
These settings are implemented as preprocessor defines instead of runtime branching for performance reasons.
TFAA_SAMPLING_METHOD |
Value | Samples | Description |
| BILINEAR | 0 |
1-tap | Hardware bilinear tap |
| CATMULLROM_5TAP | 1 |
5-tap | Catmull-Rom fast (corners omitted) |
| CATMULLROM_9TAP | 2 |
9-tap | Catmull-Rom |
| LANCZOS2_5TAP | 3 |
5-tap | Lanczos-2 fast (corners omitted) |
| LANCZOS2_9TAP | 4 |
9-tap | Lanczos-2 full optimized merge |
| LANCZOS3_21TAP_FAST | 5 |
21-tap | Lanczos-3 fast (corners omitted) |
| LANCZOS3_25TAP | 6 |
25-tap | Lanczos-3 full optimized merge |
| LANCZOS4_37TAP_FAST | 7 |
37-tap | Lanczos-4 fast (corners omitted) |
| LANCZOS4_49TAP | 8 |
49-tap | Lanczos-4 full optimized merge |
|
FSR EASU ( |
9 |
12-tap | AMD FidelityFX EASU |
Breaking change: if you previously set a custom TFAA_SAMPLING_METHOD, remap 1→3, 2→4, 3→6, 4→8, 5→1, 6→2, 7→9. |
|||
TFAA_RECTIFY_COLOR_SPACE |
Value | Channels | Description |
| RGB | 0 |
R: G: B: |
No color transform (identity); loosest rectification bounds. Most blurring and most color deviation artifacts. |
| YCbCr | 1 |
Y: BT.601 Cb: Cr: |
ITU-R BT.601 / JPEG-style full-range chroma scales (not broadcast limited-range packing). Chrominance more correlated across axes than YCoCg. Rectify path stores Cb/Cr with +0.5 offset so all axes are in [0,1]. |
| YCoCg | 2 |
Y: (R+2G+B)/4 Co: Cg: |
Malvar & Sullivan (2003 YCoCg); orthogonal chroma, more decorrelated than YCbCr. Rectify path stores Co/Cg with +0.5 offset so all axes are in [0,1]. |
TFAA_RECTIFY_OP |
Value | Description | |
| CLAMP | 0 |
Clamp history to the AABB. (TFAA_RECTIFY_SHAPE is ignored). |
|
| CLIP_NEAREST | 1 |
Ray clip towards neighborhood sample closest to history in rectification space. | |
| CLIP_MEAN | 2 |
Ray clip towards the nine-tap arithmetic average. | |
| CLIP_CENTROID | 3 |
Ray clip towards the per-channel midpoint (min+max)/2. |
|
| CLIP_CURRENT | 4 |
Ray clip towards the current pixel. | |
TFAA_RECTIFY_SHAPE |
Value | Description | |
| AABB | 0 |
3-axis | 6-faces Box - classic axis-aligned box used for clipping/clamping in common industry TAA solutions. |
|
| 14-DOP | 1 |
7-axis | 14 - faces | Box with cut corners. |
|
| 18-DOP | 2 |
9-axis | 18 - faces | Box with cut edges. |
|
| 26-DOP | 3 |
13-axis | 26 - faces | Box with cut corners and edges. |
|
TFAA_MOTION_SOURCE |
Value | Description | |
| LAUNCHPAD | 0 |
Uses MartysMods_LAUNCHPAD.fx | |
| LUMENITE_KERNEL | 1 |
Uses lumenite_Kernel.fx | |
History is not read at integer pixel coordinates. After motion, the sample point usually falls between texels at a subpixel offset.
Resampling is how we fill in that in-between value, and the choice of filter sets the tradeoff. Lighter filters smooth more; heavier ones hold edges and fine detail at the risk of extra artifacts when the sample straddles discontinuities.
The table below shows several filters at offsets 0.125, 0.25, and 0.5.
Show more examples - click to expand
Once we fetch a sample from the history buffer, we still cannot assume it belongs to this pixel in the current frame—the scene may have moved, depth may disagree, or disocclusion may have exposed objects that were not there before.
Validation is the first gate before we reuse it: depth discontinuities and disocclusion checks decide whether that sample still plausibly matches this location. If it fails, the sample is discarded entirely and only the current frame contributes, which cuts ghosting when the history clearly comes from somewhere else.
Even when validation says a history sample probably belongs to this pixel, we still cannot be sure it actually does. We then have to choose how much to trust it: keep it as-is, or pull it toward what the surrounding image looks like now. Rectification is that compromise - it reins in doubtful history instead of accepting it unchanged.
Tighter clamping and clipping yield a cleaner, sharper image with less ghosting and blur, but also less temporal stability, because plausible history that looks like an outlier gets pulled toward the neighborhood. With rectification disabled, more detail accumulates and the image stays smoother, at the cost of trails and smear when history is wrong. Different clip anchor targets bias that tradeoff differently (stability, temporal blur, sharpness, ghosting), which is why TFAA exposes several options.
| None | RGB | YCbCr | YCoCg |
|---|---|---|---|
| None | RGB | YCbCr | YCoCg |
|---|---|---|---|
Show all rectification diagrams - click to expand
CLIP_NEAREST (TFAA_RECTIFY_OP 1)
YCoCg
| AABB | 14-DOP | 18-DOP | 26-DOP |
|---|---|---|---|
CLIP_MEAN (TFAA_RECTIFY_OP 2)
YCoCg
| AABB | 14-DOP | 18-DOP | 26-DOP |
|---|---|---|---|
CLIP_CENTROID (TFAA_RECTIFY_OP 3)
YCoCg
| AABB | 14-DOP | 18-DOP | 26-DOP |
|---|---|---|---|
CLIP_CURRENT (TFAA_RECTIFY_OP 4)
YCoCg
| AABB | 14-DOP | 18-DOP | 26-DOP |
|---|---|---|---|
- License File: LICENSE.md
- Human-readable summary of the License: https://creativecommons.org/licenses/by-nc-nd/4.0/
- Full legal code: https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
- Added Lanczos-3 21-tap fast path (omitting corners - NOT lossless vs full Lanczos-3).
- Added Lanczos-4 37-tap fast path (omitting corners - NOT lossless vs full Lanczos-4).
- Shades is now available via the ReShade installer.
- Project license changed from CC BY-NC 4.0 to CC BY-NC-ND 4.0 (deed).
- Release shader files are prefixed with
shades_(e.g.shades_TFAA.fx,shades_samplers.fxh).
- Added support for Lumenite Kernel
- Optimized Lanczos resampling kernels from N² to (N−1)² bilinear taps (same output as the naive reference; used for Lanczos-2 9-tap, Lanczos-3, and Lanczos-4).
- Lanczos-4 from 64 to 49 taps
- Lanczos-3 from 36 to 25 taps
- Lanczos-2 from 16 to 9 taps
- Added Lanczos-2 5-tap fast path (cross pattern; corners omitted - not lossless vs full Lanczos-2).
- Re-release of the Shades / TFAA shader collection.
- https://creativecommons.org/licenses/by-nc-nd/4.0/
- https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode
- Fast Approximate Anti-Aliasing https://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf
- bilinear https://en.wikipedia.org/wiki/Bilinear_interpolation
- Catmull-Rom https://en.wikipedia.org/wiki/Catmull%E2%80%93Rom_spline
- Lanczos-2 https://en.wikipedia.org/wiki/Lanczos_resampling
- AMD FidelityFX EASU https://github.com/GPUOpen-Effects/FidelityFX-FSR
- iMMERSE LAUNCHPAD https://github.com/martymcmodding/iMMERSE/blob/main/Shaders/MartysMods_LAUNCHPAD.fx
- Lumenite Kernel https://github.com/umar-afzaal/LumeniteFX/blob/mainline/Shaders/lumenite_Kernel.fx
- ReShade https://reshade.me/
- Morphological Anti-Aliasing https://www.cs.cmu.edu/afs/cs/academic/class/15869-f11/www/readings/reshetov09_mlaa.pdf
- Conservative Morphological Anti-Aliasing https://www.intel.com/content/www/us/en/developer/articles/technical/conservative-morphological-anti-aliasing-20.html
- Subpixel Morphological Anti-Aliasing https://www.iryoku.com/smaa/downloads/SMAA-Enhanced-Subpixel-Morphological-Antialiasing.pdf





























































































































