Originally Posted By cgwg
Originally Posted By SoltanGris42
Ok, I took a shot at it.

Thanks! It's hard to debug this sort of thing on Linux.
Quote:
I also added in a magenta/green striped aperture mask just because I thought it was a standard feature in most crt-geom versions floating around the internet. And I added a slider to turn off the effect. I hope cgwg doesn't mind...

The main reason I never included this in the MAME version is that the same functionality was available using the -effect overlays.

I've created a new version that does a similar thing using textures loaded from files, and I've created a bunch of suitable images. Note that these are all designed for displays with RGB subpixel order, so they won't behave that well under rotation. It's available here, again in uncompiled form.


This version compiles out of the box with no changes. I'll attach the compiled version here so people can try it.

http://filebin.ca/2kZGvOzagKb0/crt-geom_bgfx_v2_compiled.zip

As far as the aperture mask goes, I always add it in the shader rather than a MAME effect overlay, because in my own shader I do additional processing after this step. Since the shadow mask/aperure grille costs a lot of brightness and some saturation/contrast, I do an additional tone-mapping step after the shadow mask to bring it back.

And for rotation I'm not sure what the best thing is. You can always just use the u_swap_xy uniform to decide whether to rotate the mask. But that doesn't always look good for every mask texture, so I don't know if should be automatic or not. Maybe just add a manual selection for mask rotation? Then people can just copy/paste the chain file and use different defaults with their vertical games.