forums.PPSSPP.org
Custom PPSSPP shaders - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: Custom PPSSPP shaders (/showthread.php?tid=6594)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


RE: Custom PPSSPP shaders - Maverick81PL - 01-09-2014 11:20 AM

How to put this shader to PPSSPP??


RE: Custom PPSSPP shaders - naoan - 01-09-2014 11:30 AM

Follow the instruction on the first post, Lunamoo does better job explaining it than I could do Tongue

By the way you can also control the bloom amount by changing the value inside the fxaa_nat_bloom.fsh, specifically these lines :
Code:
float amount = 0.375; // suitable range = 0.00 - 1.00
float power = 0.5; // suitable range = 0.0 - 1.0

Comparison :
Amount = 0.375
[Image: ibuFRF4xEudQ28.png]
Amount = 0.60
[Image: inTx1zi4d5JZ5.png]


RE: Custom PPSSPP shaders - Mitsarugi - 05-31-2014 03:21 AM

How do you even chose a shader to use ? i cant find it Sad


RE: Custom PPSSPP shaders - LunaMoo - 05-31-2014 03:53 AM

Shaders are under settings > graphics > postprocessing shader(if you click on that, a list will show up), on windows you can additionally choose it from game settings > postprocessing shader drop down menu.

If you mean how to choose shaders from this thread, you have to download them first, just read "Installation" instructions in the first post.


RE: Custom PPSSPP shaders - Mitsarugi - 05-31-2014 04:10 AM

(05-31-2014 03:53 AM)LunaMoo Wrote:  Shaders are under settings > graphics > postprocessing shader(if you click on that, a list will show up), on windows you can additionally choose it from game settings > postprocessing shader drop down menu.

If you mean how to choose shaders from this thread, you have to download them first, just read "Installation" instructions in the first post.

Thanks Luna,

That worked perfectly ^^ , i have no idea how i didn't see that option --"
+1 for you Wink


RE: Custom PPSSPP shaders - Arborea - 06-03-2014 07:29 AM

Maybe someone can port Asmodean's shaders to PPSSPP ? There is a lot of them but they are very good and better than shaders PPSSPP currently has: https://github.com/hrydgard/ppsspp/issues/6151


RE: Custom PPSSPP shaders - bdszoke - 06-23-2014 04:26 AM

Hey, I have a quick question about writing shaders. I am currently trying to create a reverse vignette shader, specifically to minimize the amount of vignetting in Final Fantasy Type 0. Instead of darkening the edges of the image, I want to lighten them. I was trying to modify the built in vignette shader, but while I have been able to increase the brightness of the center image, or actually invert image itself, I have not been able to figure out how to do this. I would assume that it would involve setting the blend mode to screen instead of multiply, to use photoshop terminology. Any help would be appreciated.


RE: Custom PPSSPP shaders - Henrik - 06-23-2014 06:28 AM

No, just change the mathematical formula to go brighter outwards. Try modifying the vignette shader like this:

float vignette = 1.0 + 0.4 * (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 2.0);

In case the vignette starts further out in FF, maybe something like this might work:

float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5);
distance = clamp(distance - 0.7, 0.0, 1.0);
float vignette = 1.0 + 0.7 * (distance * 3.0);

Or something, just guessing the numbers. Play around.


RE: Custom PPSSPP shaders - Arborea - 06-23-2014 07:11 AM

(06-23-2014 04:26 AM)bdszoke Wrote:  Hey, I have a quick question about writing shaders. I am currently trying to create a reverse vignette shader, specifically to minimize the amount of vignetting in Final Fantasy Type 0. Instead of darkening the edges of the image, I want to lighten them. I was trying to modify the built in vignette shader, but while I have been able to increase the brightness of the center image, or actually invert image itself, I have not been able to figure out how to do this. I would assume that it would involve setting the blend mode to screen instead of multiply, to use photoshop terminology. Any help would be appreciated.
Asmodean has Vignette shader maybe you can use it.


RE: Custom PPSSPP shaders - bdszoke - 06-23-2014 07:13 AM

Thanks! That made a big difference in my understanding. My final question then is that in order to modify the shader further, to control the brightness in the second example, then would I have to do something like

float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5);
distance = clamp(distance - 0.7, 0.0, 1.0);
float vignette = 1.0 + 0.7 * (distance * 3.0) + (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 4.0);

with 4 being the higher brightness?

Sorry, for all the questions, I am really new to writing shaders. But I prefer to learn how to do something instead of pestering people on the board to do it for me lol.


RE: Custom PPSSPP shaders - LunaMoo - 06-23-2014 11:47 PM

@bdszoke why don't you experiment?Tongue Just open ppsspp in a window, open shader in notepad or any editor you're using to edit it, and after you make your change and save it, it's enough to resize the window, switch to fullscreen/back or change anything else that works to refresh the shader instantly.:] If you have problem understanding some function like clamp or dot you could just check directly here, everything else is just a math.


=========================


Anyway I just looked here to say I reuploaded my shader with new preset for shadeboost which can also be done as very simple shader as I posted earlier in here which basically makes the colors colder to appear as on older psp screens, based on a picture of real psp from that issue.
At the same time I also fixed shadeboost, I guess nobody who used my shader really messed with colors since apparently the color part was broken(stupidly I used it only in a way which was accidently giving expected result;o) I was probably tired while adding it or something, blah;p, also simplified a bit the variables there.

Here's a small comparism of colors normally in ppsspp:
[attachment=11788]
and with the psp colors(or rather old psp colors, since psp 3000 had better display)
[attachment=11789]

It's strange, but for some reason many games seem to look quite nice with it, not sure if it's because of my personal prefference to colder/bluish colors or because many of those games were designed to be displayed for those old psp screens and end up too warm/dark otherwise, but I'll probably be using it for more games myself now:].


RE: Custom PPSSPP shaders - bdszoke - 06-30-2014 08:10 PM

[quote='LunaMoo' pid='86966' dateline='1403570875']
@bdszoke why don't you experiment?Tongue Just open ppsspp in a window, open shader in notepad or any editor you're using to edit it, and after you make your change and save it, it's enough to resize the window, switch to fullscreen/back or change anything else that works to refresh the shader instantly.:] If you have problem understanding some function like clamp or dot you could just check directly @...... everything else is just a math.


Thanks for the reference link, that is quite helpful. But my issue, which I haven't been able to figure out despite a full week of experimentation and googling since then is how to merge those two functions in the shader. At this point I have two functions, but it only seems to be doing the first.

In this case what I have currently is

float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5);
distance = clamp(distance - 0.7, 0.0, 1.0);
float vignette = 1.0 + 0.7 * (distance * 3.0) + (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 4.0);

where I am trying to modify both the brightness and location of the float vignette.

So I have
float vignette = 1.0 + 0.4 * (dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5) * 2.0);

which in the original one, controls the brightness and

float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5);
distance = clamp(distance - 0.7, 0.0, 1.0);
float vignette = 1.0 + 0.7 * (distance * 3.0);

which controls the location and starting point of the vignette.

Either one by itself works, it's just my attempts to do both that doesn't.

I know this might seem like a stupid question to ask, but keep in mind that my background is in History and Art, and not coding. I've never done any sort of coding in my life. Of course, that's why I want to learn now Wink


RE: Custom PPSSPP shaders - LunaMoo - 06-30-2014 09:35 PM

@bdszoke I guess you're cutting way too much from the distance in the clamp function. 0.5 is the center of the screen, so if you -0.7 the result is ALWAYS outside of the screenTongue, and so you'll never see any changes to the effect itself, only the non affected portion will change.

Basically in:
float distance = dot(v_texcoord0 - 0.5, v_texcoord0 - 0.5);
distance = clamp(distance - 0.7, 0.0, 1.0);
float vignette = 1.0 + 0.7 * (distance * 3.0);

change "3.0" to increase/decrease brightness of the effect, and change "0.7"(in second line) to lower values like 0.25 or something to actually see the effect on the screenTongue, as I explained anything above 0.5 will remove the effect totally(effect of your shader, not of the one in gameTongue).

Edit: also mathematically 1.0 + 0.7 * (distance * 3.0) equals to 1.0 + distance * 2,1 so you can simplify thisSmile

Another Edit: you should check this:3 might be better than your shader tries.


RE: Custom PPSSPP shaders - brujo55 - 08-28-2014 03:04 PM

[Image: 2wns3s1.jpg]

@LunaMoo

what value need to changein cartoon shader 1 for get more visible ouline character in dragon ball z vs tag.


RE: Custom PPSSPP shaders - LunaMoo - 08-29-2014 09:56 AM

@brujo55 never used this shader, but if you mean wider edges, then I don't think it's possible with that shader. However maybe if you apply the outline to more things it might visually make them more visible, you can increase value of "d" which will detect smaller color differences as edges to do that. Just don't increase it too high, or even gradients inside textures will get detected as edges:]. Also if the game get's too dark from doing so, you might also increase the "0.25" on the end after gl_FragColor to make it brighter.