..:: 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.
mkay. i can't tell how that grayscale improves but well... and...

the fuq. that text description before is already boiled down version to your shader's sharpen function. but right it might cost a lil much. time and such. randomizing sample locations aren't predictable by the shader compiler/optimizer. doesn't schedule cache reads well. it's atomic values waiting in the gpu. it sux. but... i thought you do the optimizing. like... use fixed scale patterns (fixed and prediactable shader code) to enlarge the scan region. use half pixel locations with bilinear filter, you effectively sample 4 pixels with 1 shot - is faster then 4 sample reads. you accumulate the luma in your function anyway. one can do that 9-tap with 4 samples (memory loads). search for it. and do the math. Wink
Updated the archive here.

Edit: uploaded the zip file, again. I didn't like the way I ended up doing the sharpen edge bias for the new sharpening (it was stupid), so I've improved it.

This should be the last update for that post. I'll probably add the new version to the shader OP, the weekend/next week.
Committed: https://code.google.com/p/pcsx2/source/detail?r=5793
Thanks for letting it be included with PCSX2, Asmodean Smile
I saw that an interface will be made for them. Does that mean that this will be the only shader we will be able to use?
I had some idea before, for making a setup thingy for Asmodean's shader. It simply used a keyword on the defines and it will load that as a setting. For example:

#define SET_BLUR_UINT (32), would show up simply as Blur on the setting window and be used as unsigned integer. On save, it would be just a text edit for the setting's line.

I had barely started any development before I stopped having time for any coding.

The idea, is that such a tool would be compatible with any shader that wanted custom settings. Or rather, any shader would be able to have setting options in a... future selection/settings dialog.
Oh okay. I asked because I use 2. His for gaussian and yours for fxaa. Hope it all works out.
Seems to be a problem with it currently http://forums.pcsx2.net/Thread-runtime-e...-cdvd-fast
If the shader failed for some reason, wouldn't the plugin just use no shader at all?
I just seen this now. My shaders shouldn't cause a runtime error like that.

According to the compile code, if the shaders didn't work for whatever reason, the emu would hard crash, as it has no clause for it. It tries to load shader.fx externally, if it's not there, it loads my shader internally, if that failed too, the emu would stop responding. Edit: that person didn't even have the shader enabled (?)

Not that its really important, but VS always messes up the alignment/indentation when I copy/pasted it in from anything but notepad++

Edit: gregory: I already have an ogl version of this, that only needs to be updated to the latest version here. So you don't need to port this.
Works fine here.