..:: PCSX2 Forums ::..

Full Version: Custom Shaders for GSdx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(11-02-2013, 09:26 PM)gregory Wrote: [ -> ]Note: you can use any name actually. It was just an example from GSdx.

May as well use that name, as it makes sense. being a hlsl semantic and all. If you've got a few spare minutes, It would be great if you'd have a quick skim through it for noob mistakes lol. It compiles and runs perfectly for me, so I overlook them unnoticed. Still Learning GL. I'm ashamed to say the In/out qualifiers still baffle me, since I changed the code form 1.2->3.3 code, a while back. But I've not gone near it in months. I find conversion of old hlsl->current hlsl far easier to do, personally.

EDIT:
(11-02-2013, 09:29 PM)xemnas99 Wrote: [ -> ]Tried it and got the following errors:

That was one of the noob errors I meant >.<

They don't give my compiler an error, so I overlook them and forget. I've re-upped it @ post #409

Thanks for testing.
Now I don't get any errors. But it seems that the shader doesn't have any effects.
open up the .slf file and ctrl+f search for const float Gamma = 0.90 (the gamma setting) and change it to ugh, 1.90, and see if the screen gets all washed out.
Yes. I change Gamma to 1.90 and it washes out the screen. Does this mean it works now?
Yes, but doesn't mean it's outputting correctly. Just means it's actually passing compilation Tongue
firstly put the gamma back to 0.90 for consistency.

Could you try it in gpuBladeSoft, and turn the shader off, and take a screen, then turn it on and take another screen, and upload them please.

You can keybind the config window in gpuBladeSoft, to change settings while the emu is running. You've to use the registry to do it with pete's OGL2

Edit: you can use the various settings in the config section of the fragment shader to customize each effect to your own liking btw.
Sure. I'm using gpuBladeSoft 1.42.

Shader disabled:
[attachment=46434]

PSXFx shader level 4:
[attachment=46435]

Natural2 shader level 1:
[attachment=46436]

Pete's OpenGL2 PSXFx shader level 4:
[attachment=46437]
Seems to be working somewhat. Although that game is really not a good one for testing it, and you already have very heavy filtering enabled, so the FXAA won't really be noticeable much. For sprite-oriented games, try out the 2DAA. Read it's description, as you need to enable it in the vertex shader also

Anyway. Feel free to experiment with the effect settings, and different games.

Seeing as it compiles for AMD now, I can at least stop messing with compiler stuff for now, and continue fixing the effects. The bloom doesn't seem to like GLSL. I ported it from pcsx2fx, and it doesn't look right in this one.

Edit: I'd recommend using notepad++ for browsing the shader, as that's what I used to write it. It will probably be all messy, and miss-aligned in notepad. Edit2: yeah, I just checked it in notepad, its all over the place. Better to use notepad++

EDIT: I've added two random off/on screens from FFIX as a reference, of the shader on/off with default settings/effects .

Off:[attachment=46438]

On:[attachment=46439]
Thanks. Wow, it is working on AMD cards at last. Smile If I use 2DAA, do I need to disable FXAA? Regarding bloom, does that mean I should disable it for now?

Also, can you remap gpuBladeSoft's hot keys? I can't. It keeps displaying "Awaiting input..." and freezes. Maybe it's because I'm using v1.42 which is unofficial. I can't use v1.41. It displays the taskbar in full screen mode.
Yeah, turn off the other AA's if you turn on the 2DAA. You can keep the bloom on, it's fine, just needs a bit of reworking. Looks more like brightness, than bloom atm.

You can press alt+enter to leave fullscreen and press it again to re-enter it, to fix the taskbar bug with 1.41 btw. Would really like to use gpuBladeSoft to replay FF 8 and 9 again. It's too slow on anything past native res though, and i'm running it on a 3770k @ 4.4Ghz. Something's not right with the X axis IR scaling. It costs way more ms than it should. The Y axis hardly costs anything per increase of scale.
Thanks. By native resolution, you mean IR 1x1, right? The performance is the same when I use IR 1x2 and 2x1 (slow). I'm using a 2500K @ 4.4GHz.