..:: 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.
It's using version 150 or higher, compiles fine from 150-430. There's an older version of it here for a reference (I'm not at my own system with the latest version currently). As I did it up for Dolphin's OGL backend. I'll have to check what extensions they're forcing again. It shouldn't need any extensions specifically for it only though.

I've no idea how it will run on Linux though.
(01-05-2014, 11:33 PM)rama Wrote: [ -> ]I committed too quickly it seems Tongue2
First of all I assume there's a problem with dx9 support:
http://forums.pcsx2.net/Thread-runtime-e...#pid339386

Then I'm not sure what to do about OGl. Maybe disable it for now.

Getting this too. It happens if you try switching to DX9 from 11 or if you boot with DX9
Asmodean:
Thanks for the quick fix. I tried using that but now I just get a crash when booting with DX9 selected.
I can't see what's still wrong with it though ><
Just to be certain before I go looking into it. (I'm on an awkward system atm, with no dev tools).

Did you try it internally, or externally? I ask because - you wouldn't by chance have a shader.fx in the pcsx2 folder, and then you tried the version I upped earlier from internally. So it would be overridden by the older external file?

edit: I'll see if I can get the dx9 conditionals done for later today, to get it done, and out of the way. SM 3 was holding me back, is the reason I dropped support for it to begin with, in case ye were wondering btw.

edit2: I double checked it there, and it's working fine for me (O.o) lol. GSdx10 loads up pcsx2fx shaders fine, and GSdx9 loads up normally, no crash. If i remove the shader.fx and let it try load up d3d9 internally, it crashes. (as it's before the temp fix)
Good catch but I don't currently have an external shader.fx file Smile
Alright, I've added the d3d9 code. Works fine for me on my end, during my testing of all effects.

I've also disabled all but the FXAA, Gamma Correction, and Texture Sharpening (they're pretty much neutral enhancements, that should be ok at default settings, without anyone needing to change them). Until we come up with a way of being able to customize the settings from it internally (via ini defines or w/e).

As it said above, it works fine here, but let me know how you get on with it. I'd have just upped it as a patch for you, if I was at my own machine.
Many thanks Smile
I had a replacement D3D9.dll still around that somehow caused the other crash I had.
It's all working here now Smile
So the shader caused that runtime error? Hmmm... it should fail more gracefully.

Is there a way to reproduce that crash? The issue thread doesn't seem to mention one.
You could remove some definitions in the fxaa.fx file, that would cause the error.
Got it, thanks.

I forgot I needed to edit the internal shader, as failed external shaders fall back to the internal FXAA.

Gotta make that fail better, and show a console error or something.

#EDIT:

I wonder, why not just leave FXAA as fallback internal and ship Asmodean's shader as default external shader instead? Easier to change shader settings too.

#EDIT2:

Code:
    try {
        CompileShader("shader.fx", "ps_main", NULL, &m_fxaa.ps);
    }
    catch (GSDXRecoverableError) {
        CompileShader(IDR_FXAA_FX, "ps_main", NULL, &m_fxaa.ps);
    }

The error was that the catch part, throws GSDXRecoverableError. It would require its own try/catch too now. That's why I would prefer Asmodean's shader to be a default shader.fx instead. I suppose it can be added to the shader folder and be copied on build. Easy to put an ogl "shader.fx" version too.