D3D ".fx" shader support?

Following the integration of the D3D driver and as an ATi/Intel HD user, I would like to know if it would be possible to implement support for “.fx” shaders?

Gulikoza has ported a few shaders to this format (cgwg/DOLLS’s CRT and CRT-simple, Maister’s Dot n’Bloom…) and some others have been available for a while (AdvancedAA, HQ2x, GS2x…) . They are used in DOSBox SVN Daum builds.

Alternatively, how hard would it be to port them to the “old” bsnes shader format used by RetroArch?

No worries if it is impossible/too much work, just being curious!

Dosbox forum thread about CRT and Dot n’Bloom port : http://vogons.zetafleet.com/viewtopic.php?p=240873#240873 Gulikoza’s page: http://www.si-gamer.net/gulikoza/

D3D-only shader formats will definitely not happen :stuck_out_tongue: Cg is very similar though, so it’s not very hard to port .fx to that.

Alright, thanks for the prompt reply =)

I deliberately steered clear off FX for the Xbox 360 port (which would have been the easy and lazy way out) - I use raw HLSL instead.

I made significant efforts to ensure that the ‘common shaders’ in the common shaders repo compile as either HLSL and/or Cg so that they are interchangeable between PS3 and/or Xbox 360 (and of course PC as well).

In my opinion, it pays to have only two standards that are well-supported (ie. GLSL XML shaders) and the Cg shader spec instead of trying to cater to every possible shader standard under the sun. I don’t see any big advantages to Fx at least and the current approach works just fine. Standardization is key here - ideally I’d want just one repo with shaders that would compile as either HLSL, Cg or GLSL, but unfortunately GLSL is so radically different that this is infeasible and instead we need to have two shadersets (one for GLSL and one for Cg/HLSL).