Custom Shaders for GSdx
(03-21-2013, 01:02 PM)KrossX Wrote: @Asmodean: You can use _rcpFrame (1/x, 1/y, 0, 0) to get the texture resolution. Though y seems to be half the value for some reason.
Ah yeah, thanks. I'm too used of expecting problems with x/y constants from working on psx.

(03-21-2013, 01:47 PM)devina40 Wrote: Just when I thought I found a good shader, PCSX2FXv1 decreased my fps by 10.
It looks good, but the fps drop isn't worth it. :/

Turn off FXAA and it's cost like 0 fps, I've got the full Timothy Lottes FXAA at highest quality turned on at the moment. This is still a WIP remember, I'm not finished yet Smile
Reply

Sponsored links

(03-21-2013, 01:02 PM)KrossX Wrote: NattyDread: That's not spread, those would be offsets, and adding that would increase the number of texture fetches per pixel more than three times. That would be slow and ugly code, I don't like that. Sorry, can't do no more for your request.

Ok, np, thanks for the "screen" version, I'll figure it out from here somehow...
Reply
Updated FX Shader @ post#238

Various code improvements. Still WIP, need some good ideas for enhancements.

I've added the DX9 code, so you can use it for that also now, if you use dx9.

Be sure to try out your own settings/combinations, if you don't like default setup. The control vars are there for a reason
Reply
Ok I did some tweaks to KrossX Screen Bloom and added 3 more Texsamples. There is a slight performance hit but nothing to noticeable on a decent machine. Anyways, I mostly did this to go on a photosession in Shadow of the Colossus so it's not a problem for me.
If anyone needs this version - ask and I'll post it with Krossx's permission.

Here is a little comparison between SweetFX+Bloom and Vanilla. (bloom turned up a little to make it more apparent here)

and on from MGS3 (kinda brings back some of the lost postprocessing)


   
Reply
You don't need my permission, just post the thing.

My blur is a 5x5 gaussian blur, Asmodean has a 7x7 blur ready that would've been easier to use. I say this cuz adding the extra samples you wanted ended up as a 9x9 blur which also requires calculating the proper coefficient for each sample. The bad thing about single pass blur, is that a 9x9 blur requires 81 samples while in dual pass would require just 18. Even better, having mipmapping would make a blurry image as easy as just sampling a small mipmap. Sadly I dunno how to implement any of this. =(

#EDIT: I must say, I don't like the Bloom + Sweet FX shots. Maybe because the sharpening is applied last? Cuz the bloom looks really blocky.
[Image: nbKSK.jpg]
Reply
Another update @ post#238

More coding improvements.
Some improvements to the FXAA.
Added a new FXAA setting, for a subtle, or more aggressive FXAA.
Merged the tonemapping, and color correction, for some optimization.
Amended the pseudo pass order of the main, for better merging of the effects.
Slightly improved the optional bloom glow(in settings) also.
Reply
I was messing around with trying to add some fake normals. It technically worked, I added them, but the UV's got all screwed up and everything is textured overlay as UV.

Can't find a work-around, so I'm scrapping the idea Tongue

Some screens;

Default (off)
   


current state (on ) <- with new intelligent tonemapping, not uploaded yet
   


Attempt at normals
   
Reply
(03-21-2013, 09:08 AM)Asmodean Wrote:
PCSX2Fx
Dx10+ is required

Current effects include:
  • HQ FXAA
  • Bloom (with optional overlay glow)
  • HDR Gamma Correction
  • Luma/Chroma Sharpening
  • Intelligent Scene Tone Mapping
  • Colour Correction (WIP)
  • Lighting Enhancements (WIP)
  • Dynamic Contrast Curves
  • Intelligent Vibrance Control

These are all done with pseudo passes, so they can all be used together, or independently of each other, in whatever combination you want. I'll be updating/adding new effects, as I get ideas.


Basically a simplified sweetFx designed for GSdx (but much more compatible, as there is no injection), I'll probably end up recoding a lot of the lighting stuff anyway, as I'm not fond of the lighting sweetfx uses. (Already started recoding most of the lighting stuff)

You can enable, or disable each effect, from inside the shader, and everything has control variables. which are clearly sectioned, and labelled.
All effects are enabled as default. If you don't like the default setup, try out your own settings & combinations, that's what they're for Tongue

On a decent modern system, the fps hit should be small to none (about the same hit as the default fxaa used by GSdx when no external shader is present), considering the scope of the shader (I personally get no fps hit). FXAA, and bloom are the two that would be most noticeable to an older system.

Feedback is welcome.

Link:
Enjoy.

--------------------
Updated to 1.11

- More code improvements.
- Furthered the Color Correction.
- Color Correction now has Intelligent Scene Tone Mapping (Takes samples of dark pixels, separately from light pixels, and adjusts them accordingly)
--------------------
Updated to 1.1

- Various code improvements.
- Some improvements to the FXAA.
- Added a new FXAA setting, for a subtle, or more aggressive FXAA.
- Merged the tonemapping, and color correction, for some optimization.
- Amended the pseudo pass order of the main, for better merging of the effects.
- improved the optional bloom glow(in settings) also.

--------------------

how you pick and choose what effects you want if there all in one?
Reply
You open up the shader in a text editor. I use Notepad++, and you can enable, disable, and customize your options inside. 0 = off, and 1 = on.

Everything is labeled.

I've included my own shader syntax highlighter in the zip file below, with a readme on how to install it.

This is what it looks like in notepad++ with my custom language;
   


Here is the custom language:
.zip   Notepad++_UserDefinedLanguage.zip (Size: 4,95 KB / Downloads: 327)
Reply
Just tried PCSX2Fx on Suikoden V, and the game looks amazing. No performance loss. Good work. Will be using this shader for now.
Reply




Users browsing this thread: 3 Guest(s)