09-16-2014, 05:14 PM (This post was last modified: 09-24-2014, 09:35 AM by quequotion.)
How can shaders be used in linux?
Yes and no, see gregory's reply.
::UPDATE::
Pretty much no until shaders in the correct format (GLSL; shader model ???) come to exist.
I have been attempting to get Asmodean's GSdx FX shader (latest version) to work with GSdxOGL (Hardware) in pcsx2-git (1.3.0-20140826231313, aka 1.3.0.r5578.9102e40) using a GeForce GT 630 with nvidia drivers 343.13.
Nothing seems to enable custom shaders. Toggling the HOME key (as advised in the wiki, to enable/disable custom shaders) does nothing; toggling the PAGEUP key makes a very minimal improvement in the quality of some jagged edges (the built-in FXAA).
There are multiple questions within this question:
-What is the correct location for shader.fx in linux? The wiki mentions a cmake var and a directory "-DGLSL_SHADER_DIR="/usr/share/games/pcsx2" in the section on AUR pkgbuild installation. This is the only hint I can find.
I have tried putting shader.fx in: /usr/bin/ with the executable (not an acceptable thing to do on linux) ~/.config/pcsx2/ because that seems logical /usr/lib32/pcsx2/ with the plugin libraries /usr/share/games/pcsx2/ which did not exist (most things are installed into /usr/share/pcsx2 for archlinux) /usr/share/pcsx2/ instead of /usr/share/games/pcsx2
-Is GSdxOGL compatible with shaders in either Software or Hardware mode? Has anyone else gotten this to work (in linux)?
All I've achieved so far is causing a bug in my nvidia driver or possibly the gpu itself (not worth attempting to describe; it's consistent across many test runs of pcsx2 with and without attempts to use shader.fx in various locations; possibly caused by simultaneous testing of Asmodean's ComplexMultiShader for FF7 in WINE).
GSdxOGL (currently) cannot be used with external shaders
-Is it necessary to specify some compile-time options to allow the use of custom shaders?
-DREBUILD_SHADER=TRUE
-Is it necessary to replace the built-in fxaa with a custom shader by patching the source?
plugins/GSdx/res/fxaa.fx
However, plugins/GSdx/res/old_fxaa.fx is the shader that (currently) gets compiled in.
09-17-2014, 02:15 PM (This post was last modified: 09-18-2014, 07:00 AM by quequotion.)
(09-16-2014, 08:28 PM)gregory Wrote: For plenty of good reason. There is no support of external shader on GSdx ogl.
What are those reasons? This is implemented with lots of things in linux; why not GSdxOGL? Does it have something to do with directx<->ogl translation? file location indecisiveness? preventing people from making false bug reports becausd of botched shader configurations?
I'm not asking to question your judgement, but to get a checklist for a roadmap to a better solution than having to patch and recompile to test each and every new shader or even an adjustment to a shader's parameters.
Quote:In short if you want to test a new shader, you need to overwrite fxaa.glsl and compile it (-DREBUILD_SHADER=TRUE)
Wow, I really did not expect the answers to my third and fourth questions to be "yes".
At least it does sound easy enough to do, but having to do it repeatedly would be a chore.
Do you mean plugins/GSdx/res/fxaa.fx?
::UPDATE::
It's easier to replace plugins/GSdx/res/old_fxaa.fx to avoid having to patch both plugins/GSdx/GSDeviceOGL.cpp and pcsx2/linux_various/glsl2h.pl
It's not as easy as plugging in the shaders made for GSdx; (CG)/HLSL shaders need to be converted to GLSL to be compiled into GSdxOGL.
(09-17-2014, 05:25 AM)hellbringer616 Wrote: Fuax bump mapping eh? I wonder how well it holds up to the real deal, Because this could add some serious improvement
EDIT:
I think all it seems to do is make everything blurry
I did a quick test on that shader and it gave a nice effect on 2d hud elements. I haven't checked the new ones.