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 49: | Line 50: | ||
|.slv/.slf, .vp/.fp | |.slv/.slf, .vp/.fp | ||
|Requires Pete's OpenGL2 or gpuBladeSoft. | |Requires Pete's OpenGL2 or gpuBladeSoft. | ||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| style="text-align: center;"|[[PCSX2]] | | style="text-align: center;"|[[PCSX2]] | ||
Line 70: | Line 67: | ||
|GLSL equiv. of cgp - possible to stack several shaders with this. | |GLSL equiv. of cgp - possible to stack several shaders with this. | ||
|} | |} | ||
− | |||
− | |||
− | |||
==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 81: | ||
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. | ||
− | === | + | ===Game Boy Shader=== |
− | + | [[File:Gb.png|thumb|189px|GameBoy Shader with default palette. Other palettes are available.]] | |
− | + | 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]]. | |
− | |||
− | |||
===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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Dithering=== | ===Dithering=== | ||
− | |||
− | |||
− | |||
− | |||
− | [[ | + | 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. |
− | + | ||
− | |||
− | |||
===Pixellate=== | ===Pixellate=== | ||
− | + | ||
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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
===Border=== | ===Border=== | ||
Line 164: | Line 113: | ||
A tone mapping shader allows you to use an external LUT texture to do tone mapping and other color adjustments.<ref name="tonemapping">http://filthypants.blogspot.com/2017/06/retroarch-tone-mapping-lut-shader.html</ref> 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. | A tone mapping shader allows you to use an external LUT texture to do tone mapping and other color adjustments.<ref name="tonemapping">http://filthypants.blogspot.com/2017/06/retroarch-tone-mapping-lut-shader.html</ref> 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== | ==Shaders on real CRTs== | ||
Line 174: | Line 121: | ||
You can combine those things with these two shader presets: [https://github.com/libretro/common-shaders/blob/master/cgp/tvout/tvout.cgp tvout.cgp] for 240p and [https://github.com/libretro/common-shaders/blob/master/cgp/tvout%2Binterlacing/tvout%2Binterlacing.cgp 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 [https://github.com/libretro/common-shaders/tree/master/cgp/tvout /cgp/tvout] and [https://github.com/libretro/common-shaders/tree/master/cgp/tvout%2Binterlacing /cgp/tvout+interlacing] for some examples. | You can combine those things with these two shader presets: [https://github.com/libretro/common-shaders/blob/master/cgp/tvout/tvout.cgp tvout.cgp] for 240p and [https://github.com/libretro/common-shaders/blob/master/cgp/tvout%2Binterlacing/tvout%2Binterlacing.cgp 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 [https://github.com/libretro/common-shaders/tree/master/cgp/tvout /cgp/tvout] and [https://github.com/libretro/common-shaders/tree/master/cgp/tvout%2Binterlacing /cgp/tvout+interlacing] for some examples. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Notable ReShade shaders== | ==Notable ReShade shaders== | ||
− | These are not [[Shader_Presets|shader presets]]. But you can create your own custom preset using these .fx shaders. As some of the effects (RTGI and Motion Estimation etc.) require depth access, make sure to have your [https:// | + | These are not [[Shader_Presets|shader presets]]. But you can create your own custom preset using these .fx shaders. As some of the effects (RTGI and Motion Estimation etc.) require depth access, make sure to have your [https://www.youtube.com/watch?v=zMceMD9OzIE depth buffer correctly configured] if you want to use them. |
− | + | [https://www.martysmods.com/rtgi/ Pascal Gilcher's RTGI shader] ($) | |
− | :Developed by [https://twitter.com/mcflypg Pascal "Marty McFly" Gilcher], RTGI & '''Screen-Space''' Ray Traced Global Illumination is | + | :Developed by [https://twitter.com/mcflypg Pascal "Marty McFly" Gilcher], RTGI & '''Screen-Space''' Ray Traced Global Illumination is an upcoming shader for ReShade which make use of Path Tracing to bring Real Time Global Illumination to every games. Global Illumination is certainly not something new for games but unlike conventional Baked / Precomputed Realtime GI, Marty McFly's Path Traced solution can provide a way more realistic and physically correct Global Illumination for every game. |
:[https://www.youtube.com/watch?v=ZOPgXRZSvzQ Ray Tracing Revolution's video about RTGI] | :[https://www.youtube.com/watch?v=ZOPgXRZSvzQ Ray Tracing Revolution's video about RTGI] | ||
− | + | [https://www.martysmods.com/regrade/ qUINT ReGrade] ($) | |
:Many shaders for ReShade are designed to apply specific color adjustments similar to industry standard software like Adobe Lightroom or DaVinci Resolve. A common approach in ReShade presets is to use many of these color adjustments at once to achieve their look. LUTs (Look-up Tables) are a cheap and simple way of changing the colours of your game without having to rely on a huge stack of shaders that eats at your performance. You can use them to make in-game colours look more natural (colour correction), or give your game a certain stylised look (colour grading) | :Many shaders for ReShade are designed to apply specific color adjustments similar to industry standard software like Adobe Lightroom or DaVinci Resolve. A common approach in ReShade presets is to use many of these color adjustments at once to achieve their look. LUTs (Look-up Tables) are a cheap and simple way of changing the colours of your game without having to rely on a huge stack of shaders that eats at your performance. You can use them to make in-game colours look more natural (colour correction), or give your game a certain stylised look (colour grading) | ||
− | : | + | :[https://framedsc.com/ReshadeGuides/lutgenguide.htm qUINT Lightroom] |
::Free alternative to qUINT ReGrade, but qUINT ReGrade recommended instead of this one. | ::Free alternative to qUINT ReGrade, but qUINT ReGrade recommended instead of this one. | ||
− | + | [https://www.martysmods.com/solaris/ qUINT Solaris] ($) | |
:Solaris is a physically based exposure and bloom solution. Together with ReGrade, they replicate the journey of light into the camera, onto the sensor and through the editing software. It uses various tricks to generate a physically plausible glow effect around bright light sources with very little performance overhead. It also supports masking objects by depth for better scene integration and make it look natural. For best practices, only use Solaris to adjust the scene brightness so ReGrade receives a well-balanced image to work with. | :Solaris is a physically based exposure and bloom solution. Together with ReGrade, they replicate the journey of light into the camera, onto the sensor and through the editing software. It uses various tricks to generate a physically plausible glow effect around bright light sources with very little performance overhead. It also supports masking objects by depth for better scene integration and make it look natural. For best practices, only use Solaris to adjust the scene brightness so ReGrade receives a well-balanced image to work with. | ||
− | + | [https://www.martysmods.com/physical-depth-of-field/ qUINT Physical DOF] ($) | |
− | :Games use a pinhole lens camera model to render their images. As such, they do not exhibit the same visual effects seen in real cameras, and effects exclusive to those have to be artificially reintroduced. A Depth of Field (or DOF) filter simulates the blurring of out-of-focus areas in the image. In a real camera, many factors influence the appearance of the DOF blur, or so-called “Bokeh”, which photographers and | + | :Games use a pinhole lens camera model to render their images. As such, they do not exhibit the same visual effects seen in real cameras, and effects exclusive to those have to be artificially reintroduced. A Depth of Field (or DOF) filter simulates the blurring of out-of-focus areas in the image. In a real camera, many factors influence the appearance of of the DOF blur, or so-called “Bokeh”, which photographers and film makers use extensively as an artistic tool. This physical Depth of Field shader recreates this effect as faithfully as possible. |
− | |||
− | |||
− | |||
− | + | [https://www.martysmods.com/clarity/ qUINT Clarity] ($) | |
− | : | + | :Effects like unsharp mask are designed to sharpen or soften the image in a wider range, to enhance medium sized details in the image and give the content some grip. The balanced, yet contrasty look of movie posters and magazine covers is quite often partially achieved through this effect. Much research is going into the type of filters that enhance local contrast, from the most basic unsharp mask to state of the art “Local Laplacian” filtering. Using this effect in realtime on video games allows to give blurry textures some bite, enhance the overall contrast of a scene or produce some pseudo Depth of Field effect to give the scene some depth. Clarity contains 2 different types of image enhancements, which can be used together. |
− | + | [https://github.com/martymcmodding/ReShade-Optical-Flow qUINT Optical Flow] | |
− | :[[Wikipedia:Motion_estimation#Related_terms| | + | :[[Wikipedia:Motion_estimation#Related_terms|Optical Flow]] for games in realtime. The nature of optical flow is to detect/compare changes between frames over time and then it gives us the motion vector in pixel color like flow map or normal map. Useful for Injecting TAA and per-object motion blurs into games [https://twitter.com/Dachsjaeger/status/1566850012163735552 (Demonstration)]. Also see [https://reshade.me/forum/shader-suggestions/6703-very-close-to-per-object-motion-blur-request-a-small-tweak this ReShade forum thread]. |
− | + | [https://github.com/lordbean-git/HQAA lordbean HQAA] | |
:Post-rendering Anti-Aliasing. | :Post-rendering Anti-Aliasing. | ||
− | + | [https://github.com/Matsilagi/RSRetroArch/ matsilagi's RSRetroArch] | |
:Repository of RetroArch and retro-related shaders / shaders from programs, ported for ReShade | :Repository of RetroArch and retro-related shaders / shaders from programs, ported for ReShade | ||
− | + | [https://github.com/MajorPainTheCactus/SonyMegatron-ReShade MajorPainTheCactus's Sony Megatron ReShade] | |
:Sony Megatron shader ported from Retroarch to ReShade. [https://reshade.me/forum/shader-presentation/8420-sony-megatron-colour-video-monitor-port-updated ReShade forum thread]. | :Sony Megatron shader ported from Retroarch to ReShade. [https://reshade.me/forum/shader-presentation/8420-sony-megatron-colour-video-monitor-port-updated ReShade forum thread]. | ||
− | : | + | :[https://github.com/MajorPainTheCactus/AutoHDR-ReShade AutoHDR] |
− | ::This add | + | ::This add on is ideally intended to be used with the Sony Megatron ReShade Port Presets. |
− | + | [https://forums.libretro.com/t/crt-guest-advanced-hd-and-ntsc-for-reshade/41880 DevilSingh's CRT-Guest-Advanced, HD and NTSC for ReShade] | |
:This is a port of the CRT-Guest-Advanced, HD and NTSC shaders from RetroArch/libretro to ReShade. | :This is a port of the CRT-Guest-Advanced, HD and NTSC shaders from RetroArch/libretro to ReShade. | ||
;Obsolete | ;Obsolete | ||
:''[https://github.com/martymcmodding/qUINT/blob/master/Shaders/qUINT_mxao.fx qUINT MXAO]:Alternative to RTGI but there is no need to use MXAO, as RTGI does what it does much better.'' | :''[https://github.com/martymcmodding/qUINT/blob/master/Shaders/qUINT_mxao.fx qUINT MXAO]:Alternative to RTGI but there is no need to use MXAO, as RTGI does what it does much better.'' | ||
+ | :''[https://gist.github.com/martymcmodding/69c775f844124ec2c71c37541801c053 qUINT Motion Estimation]:[[Wikipedia:Motion_estimation#Related_terms|Optical Flow]] for games in realtime. The nature of optical flow is to detect/compare changes between frames over time and then it gives us the motion vector in pixel color like flow map or normal map. Useful for Injecting TAA and per-object motion blurs into games [https://twitter.com/Dachsjaeger/status/1566850012163735552 (Demonstration)]. There is no need to use this one, as qUINT Optical Flow does what it does better.'' | ||
:''[https://github.com/lordbean-git/ASSMAA lordbean ASMAA]:Post-rendering Anti-Aliasing.'' | :''[https://github.com/lordbean-git/ASSMAA lordbean ASMAA]:Post-rendering Anti-Aliasing.'' | ||
:''[https://github.com/akgunter/crt-royale-reshade akgunter's crt-royale-reshade]:This is a port of the crt-royale shader by TroggleMonkey from RetroArch/libretro to ReShade 4.9+. Recommended to use "DevilSingh's CRT-Guest-Advanced, HD and NTSC" instead.'' | :''[https://github.com/akgunter/crt-royale-reshade akgunter's crt-royale-reshade]:This is a port of the crt-royale shader by TroggleMonkey from RetroArch/libretro to ReShade 4.9+. Recommended to use "DevilSingh's CRT-Guest-Advanced, HD and NTSC" instead.'' | ||
− | |||
− | |||
− | |||
− | |||
==Downloads== | ==Downloads== | ||
Line 271: | Line 206: | ||
:*[[CRT_shaders|CRT shaders]] | :*[[CRT_shaders|CRT shaders]] | ||
:*[[NTSC_filters|NTSC filters]] | :*[[NTSC_filters|NTSC filters]] | ||
− | |||
==References== | ==References== |