Shaders and Filters
Shaders and filters can be applied to video games to achieve some kind of visual effect. These can be from attempting to replicate aperture grille displays, NTSC signals, or something more exotic.
|Name||Shader file types||Notes|
|RetroArch||.cg, .cgp, .glsl, .glslp, .slang, .slangp, .dll/.so||
Old bsnes XML shaders (.shader) and old bsnes filter plugins (.filter) are no longer usable in current versions of RetroArch. SoftFilters are dynamic libraries, the extension depends on the platform.
.cgp stacks several .cg files on top of one another. Same thing with .glslp and .slangp.
|DOSBox||.fx||Only on special builds such as SVN Daum.|
|higan||.filter, .shader, folders||
.shader removed in future higan releases in favor of Quark shader folders.
.filter works in old bsnes versions (circa v082) but not current in current versions of higan.
|HqMAME||.fx||xBRZ and HQx|
|Project64||.fx||Only with a custom Rice Video plugin.|
|PCSX-Reloaded||.slv/.slf, .vp/.fp||Requires Pete's OpenGL2 or gpuBladeSoft.|
|ePSXe||.slv/.slf, .vp/.fp||Requires Pete's OpenGL2 or gpuBladeSoft.|
|PCSX2||.fx||Must be named shader.fx and be in the main directory. PageUp to activate.|
|Dolphin||.txt, .glsl||Can only be used with OpenGL backend.|
|Mobile||.glsl||GLSL is the shader language used by default on mobile (Android/iOS/Blackberry).|
|Mobile||.glslp||GLSL equiv. of cgp - possible to stack several shaders with this.|
- Main article: List of shaders and filters
- Main article: CRT Shaders
Many of these shaders replicate aperture grille CRTs, which tend to have sharp images and strong scanlines. Only a few replicate shadow mask CRTs, often requiring much higher resolutions to display the mask without aliasing.
- Main article: NTSC Filters
These software filters replicate the signals that consoles output to the TV. They vary in quality, with the lowest quality being RF, then composite, then S-Video, and then RGB (SCART) being the highest quality. Many emulators have blargg's NTSC filter libraries built into them. They can also be separately downloaded in filter plugin format.
These replicate the look of a low-resolution LCD common on handhelds. These can range from a simple grid drawn around the pixels to a detailed recreation of each pixel's RGB subpixels. May also include motion blurring to simulate ghosting and washed out color gamuts.
Game Boy Shader
This .cgp shader replicates the dot matrix screen of a Game Boy, complete with the ghosting problems to reproduce certain visual effects. Made by Harlequin. Requires RetroArch.
These shaders, such as 2xSai, Super Eagle, Super 2xSai, scaleX, HQx, xBR and xBRZ attempt to reduce the pixelation by smoothing and rounding. They can cause a lot of false positives and distortions, however, scaling the image 2x or 3x using nearest neighbor, then applying the smoothing shader will reduce the intensity of the smoothing by keeping the pixel shapes intact, eliminating most distortions while keeping a fairly smooth look.
This shader is supposed to appear the same as the nearest neighbor (aka "unfiltered"), except with minor corrections when using a non-integer scale that is increasingly less noticeable the higher it is scaled. This shader is useful to anyone who wants to keep things as sharp as possible without worrying about scale factors. Available in Quark and Cg shader formats. A newer alternative that does the same thing (but may give sharper results) is the sharp-bilinear shader, which prescales the image to a high resolution, then downscales using bilinear scaling.
A shader that applies a border overlay to the game image. Can be used to fill empty areas on widescreen monitors with artwork, display a CRT or handheld bezel, or simulate Game Boy Player and Super Game Boy output.
Image adjustment shaders allow you to adjust the color levels of an image, including gamma, luminance, contrast, saturation, and so on, for personal preference, accuracy, or compensating your display. Often, these are used alongside other shaders. There are also shaders that simulate the color profiles of specific displays, such as the GBA or DS.
A tone mapping shader allows you to use an external LUT texture to do tone mapping and other color adjustments. The LUT texture is PNG image that can be edited in any image editing software to have the desired color adjustment. When the modified LUT is used in the shader, the color adjustment gets applied to the game's video output.
Shaders on real CRTs
On 31+kHz PC CRT monitors displaying in high-resolution modes, most filters/shaders should work fine as is, as most were intended for output scaled 3x or higher.
However, CRT monitors (and 15kHz CRTs) displaying in low-resolution modes like 240p or 480p, you will find many of them won't work correctly due to the low output resolution. In these cases, you should use shaders that are applied only on the horizontal axis, only make changes to color output without scaling, or those that add scanlines/interlacing for 480p output.
You can combine those things with these two shader presets: tvout.cgp for 240p and tvout+interlacing.cgp for 480p. Both of these allow you to have adjustable signal resolution blur applied horizontally, as well as color controls like gamma, saturation, and the option to use TV color range (16-235) instead of PC color range (0-255), while the 480p version provides a scanline shader that is interlaced on 480-line content. The signal resolution blur works best if you use a large horizontal resolution (1280 or higher recommended) while keeping your vertical resolution at 240 or 480, and setting the aspect ratio of the emulator to stretch to fit. The higher horizontal resolution will make it look natural and convincing, avoiding banding issues. Can be combined with NTSC filters/shaders for maximum authenticity, check out the shader presets in /cgp/tvout and /cgp/tvout+interlacing for some examples.