MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

SoltanGris42
MAME Fan
Reged: 11/16/13
Posts: 134
Send PM
Early partially broken test version of crt-easymode-halation
08/03/16 10:22 AM Attachment: crt-easymode-halation-TEST_VERSION.zip 52 KB (4 downloads)


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)







Entire thread
Subject Posted by Posted on
* Converting CG and GLSL shader types to BGFX?? lettuce 07/31/16 03:12 PM
. * Re: Converting CG and GLSL shader types to BGFX?? SoltanGris42  08/04/16 02:33 AM
. * Re: Converting CG and GLSL shader types to BGFX?? Jezze  08/04/16 10:23 PM
. * Re: Converting CG and GLSL shader types to BGFX?? B2K24  03/17/17 07:50 AM
. * Early partially broken test version of crt-easymode-halation SoltanGris42  08/03/16 10:22 AM
. * Re: Converting CG and GLSL shader types to BGFX?? MooglyGuy  08/02/16 11:11 AM
. * Re: Converting CG and GLSL shader types to BGFX?? lettuce  08/01/16 10:05 PM
. * Re: Converting CG and GLSL shader types to BGFX?? SoltanGris42  08/01/16 02:56 AM
. * Aye. That is awful pre-tty. (nt) Traso  08/02/16 10:03 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 325 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 7587