Custom PPSSPP shaders
|
09-29-2013, 10:26 PM
(This post was last modified: 03-07-2024 11:35 PM by LunaMoo.)
Post: #1
|
|||
|
|||
Custom PPSSPP shaders
It started some time ago with just my fast growning customizable shader for quite a while, but finally we have more than one shader here, so slight reformat was needed.
======================================================= ======================================================= Here's my own shader which is very customizable(now actually divided to separate files since PPSSPP supports multi level shaders and has UI for their options) and includes: - FXAA, - 2 Gauss smoothing filters, - Guest AA 4.o, - 5xBR variant A and B scaling shader(also includes Guest.r new version with different variants), - 4xHQ scaling shader, - scalable xBRZ pre-setted for Street Fighter Alpha 3 MAX, but usable in any game you set it for - doesn't use upscaling flag so if you need an upscaling for video only while keeping the 3D as sharp as it can be you can try this, - Bloom with "Miku" option for very bright anime games, - Colored(slight enhance of colors), - Natural Colors, - Advanced Cartoon, - Sharpen, - Complex Sharpen , - Shadeboost(color editing with few presets), - Gamma correction, - Vignette with optional reverse effect, - Simple scanlines with some options, can be horizontal(default) or vertical, - LCD3x ~ note on mobiles/GLES devices it requires changing "precision mediump" to "precision highp" ~ you can use any text editor to find and replace it inside .fsh file if you want to use it - it might not be supported on all devices through and also might cause everything to be slower that's why I didn't set it by default, - few debanding methods ~ via blur and noise /dithering(with faster version as well) also includes very heavy bilateral filter now, - color reduction(by default will not appear to do much, but change RGB to lower values like all 2 or all 4 and you will see some dated graphics), - pixelate(increases the size of pixels), - custom aspect ratio(you can change PSP rendered scene to different aspect ratio, for example 4:3), - last and frankly least as nobody will use that too often, test mode, which allows apply any combination to half screen or animated change from left to right, useful for easy comparison screenshots and tweaking. I strongly recommend to customize those shaders for your liking, that's the point of my shader, if PPSSPP could easily mix various effects and allow a noob friendly customization I would more than likely never created it. Example is just so you can see how to add modified version of it to PPSSPP via ini file, check "Changing shader settings" below for more information. download link ~ last time updated old version: 2017-12-01(y-m-d), new chain version(multi-pass): 2020-05-18, even newer chain version with full UI support(no more editing files): 2021-02-26, tiny fixes to 3 effects I tested after making, but before adding UI controls and forgot about video uniform, which broke them heh...: 08.03.2024 Please use PPSSPP v1.10.3-741-g4ccde4848 or newer, older versions doesn't support UI nor test shader in chain. Installation is same as noted below, just extract all of the files into your ppsspp - assets\shaders\ folder (Android just "...PSP\Shaders" same place where saves are stored). Latest version should also work with d3d11 by glsl autotranslation(using slang and SPIRV-Cross) ~ which is available starting from v1.3-724-gc355947. Had to correct Guest 4.o AA code to match GLSL standard and added some precision workarounds for simple scanlines and xBR. Vulkan post process shaders are now supported as well ~ from around v1.5. Also starting from PPSSPP v1.4.2-438-g799c85ebe, a new kind of shaders can be made which are video aware, that is can apply different effects to videos vs in-game, as such I added new preset file with doubled config to make use of it. Warning - this preset is probably too heavy to be used on integrated graphics/low end hardware, I used some very heavy effects together, tested only on fairy powerful desktop;p. Note: Because my shaders can be used for down/up scaling now, if all you want to use it for is some basic coloring and have very weak gpu that cannot run games in at least your display resolution, you might remove "OutputResolution=True" from each shader in the included ini file. It will break all scaling, as well as scanline effects, but all the simple coloring shaders would still work and end up lighter. Otherwise I don't recommend changing this, in most situations when used on fairy powerful modern hardware disabling it will probably degrade performance thanks to how downscaling works in ppsspp. Screenies: - FFIV video smoothed with new video aware shader - same shader (~the text on that screenshot without knowing it's just a Castlevania intro might be a bit confusing;p) - 10x res 3D game with downscaling shader (Monster Hunter Portable 3rd HD) - as above with less colors added, lots of diagonal edges to see AA effect (Senjou no Valkyria III) - 1x res 2D animation with upscaling shader(Heroes Phantasia) Colors I used might be a bit too deep for most games on default, but hey customization of everything is the point here. Also upscaling shader probably works better on more static objects, but I already posted some screenshots of 5xBR variants in here and wanted to check it on low res animation anyway. - 5xBR again on more fitting scene/game(PoPoLoCrois) ======================================================= We also now have AA_Shader_v2.0_w_Natural_Vision as well as different versions of this shader + probably some extras ported by naoan which you can get from his post(click). Comparison screenies: OFF ON ======================================================= You can also find different versions of shaders implemented in PPSSPP by default + probably some extras in this Danyal Zia post. ======================================================= And Nick001's Arcade Scanlines ~ with bunch of screenshots included, if you're into scanlines that might be something to look at. If you get a bug with shader showing only bottom right corner of the screen, you can try my fix for it from this post. ======================================================= Before it get's hidden, worth linking also Guest.r Updated shaders which has a bunch of different variants of his AA shader. ======================================================= ======================================================= Installation: Simply unpack to your "..ppsspp\assets\shaders\" folder on Android it should be "...PSP\Shaders". If the shader comes without it's own ini file you can create an empty ini file in same directory(or just edit an existing one) and add some more and less important lines inside like in this example based on naoan shader: Code: [AAShaderNV] Code: [] - is just a tag, set it whatever you like In addition to above, ppsspp shader ini files also can include lines: Code: OutputResolution=True #1 2) Forces rendering resolution to x1 and screen scaling filter to nearest - settings required by upscaling shaders to work. 3) Enables integer support, most shaders will not require it. 4) It will set up a resolution with a multiply of set value of current window resolution, so let's say you're running the game in x2 window with x2 SSAA it will have full HD resolution, but if you then switch to fullscreen, it will use a resolution used by your monitor multiplied by 2, such super sampling combined with any blurry filter will result in super sampling AA effect. 5) It does the same thing as the option to duplicate frames up to 60, except this was existing much earlier as it's doing so for shaders that include animation without that flag animation speed would be affected by FPS changes in-game which is bad for a post process. ======================================================= Changing shader settings: Just use PPSSPP UI, latest version(post release!) allow shader modification directly from graphics settings menu, I even cut my large shader and provided it in separate effects each with it's own settings. My own shader, under defines also comes with a list of approximate performance hit so you get the general idea which shaders to avoid on slower hardware. In general most desktops with modern dedicated gpu(including cheap ones) should be fine with everything, it also depends a lot on the rendering resolution used, for example xBR is easily the heaviest effect there, but due to upscaling shaders requiring x1 rendering res it might actually be lighter than some cheap downscaling shader used with x10 render res even through both would in the end output same resolution image.:] ======================================================= Creating your own shaders: It's actually easy, it was a black magic for me as well, but turned out they're easy to code and no point on doing it from 0 either, many effects are already free to use on the net, just search for GLSL fragment shaders that doesn't require multiply passes or even to HLSL pixel shaders since they're easy to port, tutorials are also scattered around the net, easy to find something for any level. Not sure if it works on NVidia gpu's, but you might try AMD GPU Shader Analyzer which helps alot in terms of debugging or even optimizing and allows to simulate shader compilation on many different AMD GPU's on different driver version(how's that useful you ask? Well if a shader works on AMD it'll rather Another nice tool(CLI) OpenGL / OpenGL ES Reference Compiler, no gui makes it a bit more bothersome to use, but will in theory detect all problems, in practice it still fails to ensure shaders will work on mobiles, since they have messed up drivers and this only checks if code follows GLSL standard:]. =========================== Due to some recent post in this thread as of 2017-01-29 I have to add that I don't support spreading any of my work done for free especially stuff I really care to be easily customizable by community through some personal beerfund advertisement links and close minded rulesets or on sites that promote those. Will I bother stopping people from doing it? No, I'm even putting it at the very bottom of the post for most people to not waste time reading this, but I will never support nor promote any of this and if you're normal decent human being you shouldn't either and any average user can do better than whatever they would show on screenshots when begging for fixing something they broke while ripping something they couldn't understand. =========================== http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders! http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats, https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds. |
|||
« Next Oldest | Next Newest »
|