Custom PPSSPP shaders
|
03-15-2018, 10:13 AM
Post: #331
|
|||
|
|||
RE: Custom PPSSPP shaders
Just for fun, I've also ported the 'psp-color' shader from RetroArch. This applies colour correction to replicate the LCD dynamics of the PSP 1000 and PSP 2000 displays. Basically, this fixes the oversaturated colours you sometimes get as a result of developers 'overcompensating' for the limited colour gamut of the original PSP models (it's not as significant an issue for the PSP as it is for the GBA or NDS, but it still makes games look a little garish by default).
The attached zip file is a bundle containing all my shaders so far: the 'psp-color' shader, my zfast_lcd port and hybrid shaders that combine the two effects. As before, there are standard and 'mobile' versions (please see the previous post for more details). Here are a couple of random examples of the shaders in action: --- BUST A MOVE DELUXE With the "zfast LCD Shader": With the "zfast LCD + PSP Color" shader: Note how the colour correction makes the greens more natural, and removes the lurid purpleness of the background. --- WipEout Pulse With no shader: With the "PSP Color" shader: Without colour correction, the background highlights are all purple. With colour correction applied, you can see that they are supposed to be a mixture of purple and blue. --- I guess the effects are fairly subtle, but I think it's worth playing around with... |
|||
03-22-2018, 09:59 AM
(This post was last modified: 03-29-2018 08:10 AM by jdgleaver.)
Post: #332
|
|||
|
|||
RE: Custom PPSSPP shaders
I've updated my shader collection with a few more ports and such - this is probably the last of them now, so I'll stop spamming this thread...
You can get a copy of the final bundle here: ppsspp_shader_bundle.zip (Size: 42.23 KB / Downloads: 4895) It contains my existing 'PSP Color' and 'zfast LCD' variants, plus the following new additions: === Bead === This is a port of the 'bead' shader from RetroArch, which turns each pixel into a round bead. The native PSP resolution is actually too high for this to work entirely as it should (unless you have a 4k+ display), but it still produces quite a nice clean, crisp result: [Bead] / [Bead + PSP Color] Notes: - REQUIRES a rendering resolution of 1xPSP - REQUIRES a display resolution of at least 1080p - Runs at full speed on mid-range Android devices === Dot === This is a port of the 'dot' shader from RetroArch, which produces an LCD effect with a sort of cosy glow to it: [Dot] / [Dot + PSP Color] Notes: - REQUIRES a rendering resolution of 1xPSP - REQUIRES a display resolution of at least 1080p - This is quite a 'heavy' shader, intended for Desktop use. I've included a 'mobile' version (for Android, as I have with all the shaders), but you'll struggle to run it at full speed unless you have a beastly device. === LCD3x === This is a port of the LCD3x shader from RetroArch. NB: There is already a version of this in LunaMoo's superb shader collection, but it has a hard-coded 'scanline size' parameter which doesn't match the pitch of the PSP screen. This shader just fixes that one issue, and adds a 'PSP Color' variant. [LCD3x] / [LCD3x + PSP Color] Notes: - REQUIRES a rendering resolution of 1xPSP - Runs at full speed on mid-range Android devices - Does *not* require a 1080p display! This shader produces decent results (i.e. no unbearable aliasing effects) at 1360x768, so it's quite good for potato laptops: === LCD1x Sharp === Personally, I don't like blurry shaders, and the the colour separation of LCD3x gives me a massive headache... so I made a 'tweaked' version that is 'sharp' and which omits the 3-band LCD colour effect: [LCD1x Sharp] / [LCD1x Sharp + PSP Color] Notes: - REQUIRES a rendering resolution of 1xPSP - Runs at full speed on mid-range Android devices - As with the LCD3x shader, produces decent results at 1360x768: |
|||
03-22-2018, 10:32 PM
(This post was last modified: 04-04-2018 03:32 PM by LunaMoo.)
Post: #333
|
|||
|
|||
RE: Custom PPSSPP shaders
(03-22-2018 09:59 AM)jdgleaver Wrote: (...) I would say there's nothing hardcoded in any post process shader loaded externally from text file;p, but also "scanline size" is actually a define right under the option to activate the effect, left there specially to be messed with.;p (03-22-2018 09:59 AM)jdgleaver Wrote: (...) Hint: as long as it doesn't depend on linear screen scaling filter(which overall makes image blurry when stretched from x1 to higher display/window res) you can simply add "upscaling" flag to shader ini file as it forces x1 render res and nearest screen scaling filter ~ it's required for upscaling filters, but can be used freely for any effects which have similar requirement. This will avoid manual switching of resolution and bothering people to remember about doing so. ~ Quick copy-paste reminder of flags we have: Code: RequiresIntSupport=True - when unsure, you most likely don't need it We also have some special uniforms like Code: u_time 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. |
|||
03-23-2018, 09:49 AM
Post: #334
|
|||
|
|||
RE: Custom PPSSPP shaders
(03-22-2018 10:32 PM)LunaMoo Wrote: I would say there's nothing hardcoded in any post process shader loaded externally from text file;p, but also "scanline size" is actually a define right under the option to activate the effect, left there specially to be messed with.;p You are of course correct! I didn't intend any disrespect towards your work! What I meant to say is that the 'scanline size' value in your shader has to be entered by hand, whereas it's just as easy to determine the 'correct' value automatically... (03-22-2018 10:32 PM)LunaMoo Wrote: Hint: as long as it doesn't depend on linear screen scaling filter(which overall makes image blurry when stretched from x1 to higher display/window res) you can simply add "upscaling" flag to shader ini file as it forces x1 render res and nearest screen scaling filter ~ it's required for upscaling filters, but can be used freely for any effects which have similar requirement. This will avoid manual switching of resolution and bothering people to remember about doing so. I realise this is true (and I used it for some of the shaders)... but at least for me, running under Linux (OpenSUSE), the 'upscaling' flag is rather unreliable - half the time I have to switch to another shader and back again before the 1xPSP resolution is enforced. It may be a bother to set the resolution manually, but at least that way I can be sure it's going to work... |
|||
03-23-2018, 03:08 PM
Post: #335
|
|||
|
|||
RE: Custom PPSSPP shaders
(03-23-2018 09:49 AM)jdgleaver Wrote: (...) Don't worry and don't treat me like an rotten egg. I'm not oversensitive nor delicate.;p Frankly the only time I felt disrespected here was when some dude took my work, edited default values changing options half of which were counter productive or even intentionally disabling each other which he didn't even understand and posted a link to his site filled with advertisement which had a link behind even more advertisement to grab his edited shader;p. Aka I'm not a fan of people earning money of other people's work released for free, doesn't matter how they change it and how they choose to charge for it, parteon, invasive ads, or any other bullshit popular among some greedy people who make excuses on having to pay for hosting costs etc is really the only thing I can't stand and unfortunately it became a thing in "emulation" due to rise in popularity . (03-23-2018 09:49 AM)jdgleaver Wrote: (...)If you have problem with it, best if you open an issue on PPSSPP issue tracker might be some linux specific problem possibly some race issue as I recall linux behaving differently from windows during resizing which was never properly fixed yet. The flag was always reliable on windows, through from some time I mostly used d3d11 backend which ofc is not an option for linux users.;c 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. |
|||
04-06-2018, 06:18 PM
(This post was last modified: 04-06-2018 06:19 PM by Endarko.)
Post: #336
|
|||
|
|||
RE: Custom PPSSPP shaders
please port to ppssp
shadersmods.com/chocapic13s-shaders-mod/ |
|||
04-07-2018, 03:17 PM
Post: #337
|
|||
|
|||
RE: Custom PPSSPP shaders
You can forget about post processing filters from moddable games, they're using a lot of game specific uniforms and can't be ported, because PPSSPP does not provide nor have the information they're based on.
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. |
|||
04-09-2018, 04:35 AM
Post: #338
|
|||
|
|||
RE: Custom PPSSPP shaders
whether shader like this can be used in ppsspp? I've tried changing the name of shaders.vert to shaders.fsh but the game screen becomes a black screen
#version 300 es precision highp float; in vec3 position; in mediump vec3 normal; in vec2 texcoord; uniform mat4 u_proj; uniform mat4 u_world; uniform mat4 u_view; uniform vec4 u_uvscaleoffset; uniform vec3 u_lightpos0; uniform lowp vec3 u_lightambient0; uniform lowp vec3 u_lightdiffuse0; uniform vec3 u_lightpos1; uniform lowp vec3 u_lightambient1; uniform lowp vec3 u_lightdiffuse1; uniform vec3 u_lightpos2; uniform lowp vec3 u_lightambient2; uniform lowp vec3 u_lightdiffuse2; uniform lowp vec4 u_ambient; uniform lowp vec3 u_matdiffuse; uniform lowp vec4 u_matspecular; uniform lowp vec3 u_matemissive; uniform lowp vec4 u_matambientalpha; uniform highp vec2 u_fogcoef; out lowp vec4 v_color0; out mediump vec3 v_texcoord; out mediump float v_fogdepth; void main() { vec3 worldpos = (u_world * vec4(position.xyz, 1.0)).xyz; mediump vec3 worldnormal = normalize((u_world * vec4(normal, 0.0)).xyz); vec4 viewPos = u_view * vec4(worldpos, 1.0); gl_Position = u_proj * viewPos; lowp vec4 lightSum0 = u_ambient * u_matambientalpha + vec4(u_matemissive, 0.0); vec3 toLight; lowp vec3 diffuse; mediump float ldot; toLight = u_lightpos0; ldot = max(dot(toLight, worldnormal), 0.0); diffuse = (u_lightdiffuse0 * u_matdiffuse) * ldot; lightSum0.rgb += (u_lightambient0 * u_matambientalpha.rgb + diffuse); toLight = u_lightpos1; ldot = max(dot(toLight, worldnormal), 0.0); diffuse = (u_lightdiffuse1 * u_matdiffuse) * ldot; lightSum0.rgb += (u_lightambient1 * u_matambientalpha.rgb + diffuse); toLight = u_lightpos2; ldot = max(dot(toLight, worldnormal), 0.0); diffuse = (u_lightdiffuse2 * u_matdiffuse) * ldot; lightSum0.rgb += (u_lightambient2 * u_matambientalpha.rgb + diffuse); v_color0 = clamp(lightSum0, 9.0, 1.0); v_texcoord = vec3(texcoord.xy * u_uvscaleoffset.xy, 0.0); v_fogdepth = (viewPos.z + u_fogcoef.x) * u_fogcoef.y; } |
|||
04-09-2018, 09:31 AM
Post: #339
|
|||
|
|||
RE: Custom PPSSPP shaders
Check my post above as it's exactly about stuff like that.
Maybe it would be possible to provide more specific information via some addition to texture replacement or something, but nothing like that exists currently and even if someone would make it possible(which would be a lot of work aka might never happen), it would require a lot of manual work for each game from the user to make use of any effect using such extra information. And even then it would most likely be impossible to reproduce everything which native moddable game has. 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. |
|||
06-05-2018, 08:13 PM
(This post was last modified: 06-05-2018 08:19 PM by ppssp213.)
Post: #340
|
|||
|
|||
RE: Custom PPSSPP shaders
Still tweaking, trying not destory the smokey / rainy atmosphere
but give it richer colours for better greens and browns. Code: #define SHADEBOOST 1 //ON:1/OFF:0 /color correction from GSdx/pcsx2 plugin, initially taken from |
|||
10-01-2018, 07:21 AM
Post: #341
|
|||
|
|||
RE: Custom PPSSPP shaders
Simple request. Is it possible to port the sharp-bilinear-simple shader from libretro to PPSSPP? All it does is prescale the image by nearest neighbor integer scaling as high as possible under the current display resolution, and then uses hardware bilinear scaling to do the rest. Extremely useful for 2D games, and it has effectively no performance cost under modern hardware.
I'd do it myself, since the GLSL code doesn't seem to need rewriting, but I don't know how to split it into explicit fragment and vertex shaders as PPSSPP requires. (I also don't know if it'd be Vulkan compatible, and I'd like to use this with my Android phone as well.) I can't link the shader because of account restrictions, but it's sharp-bilinear-simple.glsl under the libretro/glsl-shaders repo on GitHub. That or I'll just post the entire code here: Code: /* |
|||
06-01-2019, 02:36 PM
Post: #342
|
|||
|
|||
RE: Custom PPSSPP shaders
Hello. Thanks for all your wonderful work guys. Thanks to you, my games are looking absolutely gorgeous (like ps2.5). I wanted to combine the effects of my two favorite shaders "fxaa_nat_bloom" and "cartoon shader I" from the epsxe pack (both of which are I can't do without now. Thumbs up to the creators.) but to no avail. So if one of you experts can do this for me, I'd be eternally grateful.
Thank you. |
|||
07-27-2019, 12:39 PM
Post: #343
|
|||
|
|||
RE: Custom PPSSPP shaders
After playing Liberty City Stories on PCSX2 emulator, I finally got to play Chinatown wars on PPSSPP emulator.
And what I'm missing here is scanlines filter variant that was presented there. Its called: diagonal filter. So my question will be: is it possible to modify current scanline shader to add an angle, or it will be easier to write down new one (port from PCSX2)? On first sight it looks kinda simple, just same lines over entire screen, just with 45 degree angle. https://i.imgur.com/Iz4GV3n.png |
|||
10-13-2019, 04:20 AM
Post: #344
|
|||
|
|||
RE: Custom PPSSPP shaders
Hello All.
I'm in need of help removing the corners? I'm using CRT Lottes TV from this post. https://forums.ppsspp.org/showthread.php...#pid128965 Thanks |
|||
11-02-2019, 05:09 PM
(This post was last modified: 11-02-2019 05:11 PM by guest.r.)
Post: #345
|
|||
|
|||
RE: Custom PPSSPP shaders
Hey there! Corners are sortoff hard-coded into the shader, but they can be altered/removed.
You need to alter the corner value in the corner function: Code: float corner(vec2 coord) to a lower value, but greater than 0.0 or the image would turn black. Thanks for having fun... |
|||
« Next Oldest | Next Newest »
|