Editing Shaders and filters

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
Shaders and filters can be applied to video games to enhance visuals or achieve some kind of visual effect. These can be from attempting to replicate [[Display FAQ|aperture grille]] displays, NTSC signals, or something more exotic.
 
Shaders and filters can be applied to video games to enhance visuals or achieve some kind of visual effect. These can be from attempting to replicate [[Display FAQ|aperture grille]] displays, NTSC signals, or something more exotic.
 +
Visit the [[List_of_shaders_and_filters |List of shaders and filters]] page for more examples.
  
 
==Emulator support==
 
==Emulator support==
Line 75: Line 76:
  
 
==Types==
 
==Types==
 +
{{Main|List of shaders and filters}}
 
[[File:Crt-geom.png|thumb|190px|crt-geom-flat.cg, a popular CRT shader.]]
 
[[File:Crt-geom.png|thumb|190px|crt-geom-flat.cg, a popular CRT shader.]]
 
===CRT Shaders===
 
===CRT Shaders===
Line 86: Line 88:
 
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<ref name="blargg">http://slack.net/~ant/libs/ntsc.html</ref> built into them. They can also be separately downloaded in filter plugin format.
 
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<ref name="blargg">http://slack.net/~ant/libs/ntsc.html</ref> built into them. They can also be separately downloaded in filter plugin format.
  
 +
===LCD Shaders===
 +
[[File:Lcd-grid.png|thumb|256px|cgwg's lcd-grid-v2 shader with GBA colors.]]
 +
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.
  
===Handhelds===
+
===Game Boy Shader===
These shaders replicate the visuals of the Dot matrix and LCD displays of older handhelds and their specific artifacts in comparison to newer screens.
+
[[File:Gb.png|thumb|189px|GameBoy Shader with default palette. Other palettes are available.]]
  
For LCDs 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.
+
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]].
[[File:Dot.png|thumb|right|[https://github.com/libretro/common-shaders/blob/master/handheld/dot.cg dot.cg]]][[File:Lcd.png|thumb|left|[https://github.com/libretro/common-shaders/tree/master/handheld/lcd-shader lcd]]][[File:Lcd3x.png|thumb|centre|[https://github.com/libretro/common-shaders/blob/master/handheld/lcd3x.cg lcd3x.cg]]]
 
[[File:Lcd-grid.png|thumb|left|256px|cgwg's lcd-grid-v2 shader with GBA colors.]][[File:Gb.png|thumb|189px|right|GameBoy Shader with default palette. Other palettes are available.]][[File:Gameboy.png|thumb|centre|[https://github.com/libretro/common-shaders/tree/master/handheld/gameboy Gameboy],  replicates the dot matrix screen of a Game Boy, complete with the ghosting problems to reproduce certain visual effects. Made by Harlequin. Requires [[RetroArch]]]]
 
  
 
===Smoothing shaders===
 
===Smoothing shaders===
  
 
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.
 
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.
====Lanczos====
 
[https://github.com/libretro/common-shaders/blob/master/lanczos/lanczos4.cg lanczos4.cg], [https://github.com/libretro/common-shaders/blob/master/lanczos/lanczos6.cg lanczos6.cg], [https://github.com/libretro/common-shaders/blob/master/lanczos/lanczos12.cg laczos12.cg], [https://github.com/libretro/common-shaders/blob/master/lanczos/lanczos16.cg laczos16.cg]
 
  
[[File:Lanczos12.png|thumb|right|200px|lanczos12.cg]][[File:Lanczos4.png|thumb|left|200px|lanczos4.cg]][[File:Lanczos6.png|thumb|centre|200px|lanczos6.cg]]
 
[[File:Lanczos16.png|thumb|centre|200px|lanczos16.cg]]
 
====Bicubic====
 
Enlarges images by calculating the colour values of new pixels based on a weighted average of neighbouring pixels in the original image. Popular for its ability to produce smooth, high-quality results when resizing images, especially when significant upscaling is required.
 
{| class="wikitable"
 
! scope="col" style="text-align: center;"|Name
 
! scope="col" style="text-align: center;"|Image
 
! scope="col" style="text-align: center;"|
 
Description
 
|-
 
| style="text-align: center;"|[https://github.com/libretro/common-shaders/blob/master/bicubic/bicubic-fast.cg bicubic-fast.cg]
 
| style="text-align: center;"|
 
| style="text-align: center;"|
 
|-
 
| style="text-align: center;"|[https://github.com/libretro/common-shaders/blob/master/bicubic/bicubic-normal.cg bicubic-normal.cg]
 
| style="text-align: center;"|
 
| style="text-align: center;"|
 
|-
 
| style="text-align: center;"|[https://github.com/libretro/common-shaders/blob/master/bicubic/bicubic-sharp.cg bicubic-sharp.cg]
 
| style="text-align: center;"|
 
| style="text-align: center;"|
 
|-
 
| style="text-align: center;"|[https://github.com/libretro/common-shaders/blob/master/bicubic/bicubic-sharper.cg bicubic-sharper.cg]
 
| style="text-align: center;"|
 
| style="text-align: center;"|
 
|}
 
====DDT====
 
Data-Dependent Triangulation Shaders look at the square plane formed by the four nearest neighbours (a basic image resizing technique that assigns each pixel in the resized image the colour value of the nearest pixel in the original image). They divide the square plane into two triangular planes. The pixels are bilinearly interpolated using only the three points of the triangles to which they belong.
 
[[File:Ddt-waterpaint.png|thumb|left|[https://github.com/libretro/common-shaders/blob/master/ddt/ddt-waterpaint.cg ddt-waterpaint.cg]]][[File:Ddt.png|thumb|right|[https://github.com/libretro/common-shaders/blob/master/ddt/ddt.cg ddt.cg]]][[File:Ddt-extended.png|thumb|centre|[https://github.com/libretro/common-shaders/blob/master/ddt/ddt-extended.cg ddt-extended.cg]]]
 
====Hqx====
 
("hq" stands for "high quality" and "x" for magnification) is a pixel art scaling algorithm developed by Maxim Stepin and used in emulators such as Nestopia, bsnes, ZSNES, Snes9x, FCE Ultra and many more. There are 3 hqx filters: hq2x, hq3x and hq4x, which scale by a factor of 2, 3 and 4 respectively.
 
[[File:Hq2x.png|thumb|left|[https://github.com/libretro/common-shaders/blob/master/hqx/hq2x.cg hq2x.cg]]][[File:Hq4x.png|thumb|right|[https://github.com/libretro/common-shaders/blob/master/hqx/hq4x.cg hq4x.cg]]]
 
====Eagle====
 
[[File:Super-eagle.png|thumb|right|[https://github.com/libretro/common-shaders/blob/master/eagle/super-eagle.cg super-eagle.cg]]]
 
 
===Dithering===
 
===Dithering===
 
{{Main|Dithering#Shaders}}
 
{{Main|Dithering#Shaders}}
A technique used to increase the amount of colour and shading that can be produced on a system. The effect is achieved by using lines or dots which are then blurred by the low quality NTSC signals (composite or RF) used by the system.
+
These are shaders designed to detect and smooth [[dithering]]. [https://github.com/libretro/common-shaders/tree/master/dithering mdapt] is a popular one. There is also a newer gdapt.
===Anti-aliasing===
 
A graphics rendering technique used to reduce or eliminate jagged or stepped edges (aliasing artefacts). It works by applying various methods such as super-sampling, multi-sampling, or post-processing filters to improve the smoothness and visual quality of the image, particularly when displaying diagonal lines, curves, or fine details.
 
  
[[File:Advanced-aa.png|thumb|left|200px|[https://github.com/libretro/common-shaders/blob/master/anti-aliasing/advanced-aa.cg advanced-aa.cg]]]
 
[[File:Fx-aa.png|thumb|right|200px|[https://github.com/libretro/common-shaders/blob/master/anti-aliasing/fx-aa.cg fx-aa.cg]]]
 
[[File:Fxaa-edge-detect.png|centre|thumb|200px|[https://github.com/libretro/common-shaders/blob/master/anti-aliasing/fxaa-edge-detect.cg fxaa-edge-detect.cg]]]
 
[[File:Reverse-aa.png|thumb|centre|200px|[https://github.com/libretro/common-shaders/blob/master/anti-aliasing/reverse-aa.cg reverse-aa.cg]]]
 
 
===Pixellate===
 
===Pixellate===
[[File:Pixellate.png|thumb|200px]]
+
 
 
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 [https://github.com/hizzlekizzle/quark-shaders/tree/master/Pixellate.shader Quark] and [https://github.com/libretro/common-shaders/blob/master/retro/shaders/pixellate.cg 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.
 
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 [https://github.com/hizzlekizzle/quark-shaders/tree/master/Pixellate.shader Quark] and [https://github.com/libretro/common-shaders/blob/master/retro/shaders/pixellate.cg 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.
===Auto-box===
 
[[File:Box-max.png|thumb|left|200px|[https://github.com/libretro/common-shaders/blob/master/auto-box/box-max.cg box-max.cg]]]
 
[[File:Sharpen-lighter-box.png|thumb|right|200px|[https://github.com/libretro/common-shaders/blob/master/auto-box/sharpen-lighter-box.cg sharpen-lighter-box.cg]]]
 
 
Shaders that scale the image within the viewport. This can be useful for ensuring a certain quality of scaling, often with the intention of applying other effects on top that are picky about scaling.
 
  
 
===Border===
 
===Border===

Please note that all contributions to Emulation General Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Emulation General Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: