Well I gave it a shot this evening because I had some free time. I didn't get it working perfectly yet, but you can try it out.
Here's what's still broken:
- The DX9 version is completely BROKEN. More on this below. So you MUST use either dx11 or opengl for your 'bgfx_backend'.
- Interlacing screws up the curvature settings because of the way it adjusts texture coordinates. I just noticed after I zipped it all up to post here. It's probably easy to fix.
- Halation might not be exactly right (it still looks fine though). As far as I can tell, the original retroarch version doesn't rely on bilinear filtering when sampling the blurred texture but I had to in order for it to look right. I messed something up or this is correct. I don't know which.
- I had to use "#define"s to special case HLSL and GLSL because they assume opposite matrix alignments. This is ugly, but I didn't want to split the matrix vector calculations out into scalar ops until it mostly worked. This is one possible place that dx9 might be going wrong.
- I've read that dx9 has an offset that needs to be accounted for in the texture coordinates. If that's the issue it will be harder to fix.
- MAME's shaders should respect alpha so that compositing multiple layers is correct. I didn't worry about that at all for now.
- Every file will need a 'license' and 'author' indicated. The license is just 'GPL' in the original I think. And the author is 'easymode' and maybe someone else too.
- And so many more bugs!
I'll try to fix this up enough that MAME will take it with a pull request. But for now, here you go. BTW, the default settings I used don't look too much like your pictures, but I added pretty much everything as a slider option so you can adjust it to your liking. If you're new to MAME's bgfx shaders, be aware that you actually have to edit the 'crt-easymode-halation.json' file by hand in ...MAME/bgfx/chains to change the defaults.
Just merge the 'bgfx' folder in this zip file with the one in your mame folder and it should work. Don't forget to change your 'bgfx_backend' to 'dx11' or 'opengl' if the 'auto' option gives you dx9...
Here's the file on another site: http://filebin.ca/2qGqizsiYP7r/crt-easymode-halation-TEST_VERSION.zip
And I'll also attach it to this post.
Edited by SoltanGris42 (08/03/16 10:25 AM)