Unfortunately that’s out of question :((
No problem.
Regarding the issue @estefan3112 faced, when I’m met with backdrop games that require a color overlay, I don’t rely on shaders at all, instead I create a stripped down mame artwork lay. With only the color overlay being used:
Wow, nice! If you refer to ‚stripped down lay‘, do you imply this works for you in RetrpArch? Would be interesting in settings (download link), as my attempts to configure lay files in MacOS failed. Thank you!
Very exciting, thank you! If you see @Starman99x s screenshot of Space Imvaders Delexe, this seems to be a combination of backdrop and overlay. Indeed, the MAME implementation allows a combination of an overlay with a backdrop. But I appreciate any further development of these rather remote topics very much!
Yes, this is working in RetroArch. You can find examples, instructions, and some lay files I made in my arcade pack here (featuring @soqueroeu).
Message me if you need further instructions.
I hope it is done and complete, because my mind is about to explode while trying to fit things into the shader and keeping the resource use relatively low; expect about 1% performance impact (measured on intel Haswell).
The new parameter “Content blend mode”, will be used when “Display only on content” is enabled:
- 0: retains the previous behaviour, so that the backdrop image is added to the underlying content, modulated by the content brightness (less on bright, so useful for ambient reflections).
- 1: Is the new blend method, and it multiplies the backdrop by the content.
- New to both: Support for png/alpha channel, this allow for better emulation of scratches/glass cracks and maybe other things(?)
- New: when “Display only on content” is enabled, the backdrop will be stretched to the content geometry, this means it will tilt and curve according to the shader settings, but this also means that the picture aspect needs to match the content one, so please don’t try to fit a 16:9 image into a 4:3 display.
- NO SUPPORT FOR ROTATION, you have to rotate the image yourself. Use shader presets wildcards for automation; please don’t ask for support, it’s been already tough to make it fit everything as is.
- NEW: when Display only on content" is enabled, ambientlight and reflections will react accordingly.
Multiplicative blending just on the tube, jpg @estefan3112 :
Multiplicative blending just on the tube, png with alpha @Starman99x :
Additive blending just on the tube, jpg:
Caveat: Ambient reflections don’t play nice with tilt, since they should stay straight, so you’d need to couteract that by anti-tilt them before if really needed.
All is still in this branch, please test it:
Amazing work
. I’ll test these ASAP.
So I finished testing these out. I absolutely loved all the new changes. Here’s my feedback:
I opted for rotating the image file itself instead of wildcards, this is similar to the old koko-aio behavior/solution (easy-peasy):
Before:
After:
Tilt works nice and fine with backdrop games though:
Very nice, and it was a very good idea to keep the original behavior when “Display only on content” is disabled, that’s useful for my VGA CRT setup, especially in some edge cases like this one:
But I wish the mid overlay’s blending and opacity params can work when “Display only on content” is disabled (maybe with alpha png too?).
This works very nicely with my Tamagotchi backdrop:
Unfortunately, I can’t make proper use of this cool feature with my Game Boy Player borders:
However, If “Override Content Geometry” can exclude the mid-overlay, then I can fit the inner 4:3 border properly around the 3:2 content image.
Actually, I think this has become generally necessary in light of the new changes. It does not make sense for “Override Content Geometry” to override the Mid-Overlay at all. This is going to create inconsistencies with all presets that depend on both features, for example even simple reflections will scale weirdly, not just my “hacky borders”.
Thank you for the in depth test.
The proper way of handling all of this would be to have not 1, but 3 different textures; 1 for the mirror, 1 for the gel and another for the ambient reflections each with it’s own blend mode, this is not doable since texture “slots” in the final pass are almost exhausted.
Why? Right now the backdrop simulates the mirror reflected screen; I fail to find a legit usecase for another blending method. Also, I smell complications ahead dealing with ambientlight and background pictures in this regard; gut feeling.
This is the best tradeoff I went up to. The shader cheaply reuses the content coordinates, so it can tilt, curve, but will also zoom with the content, and yes, I’m aware it generates an inconsistence when you expect it to simulate ambient reflections, but it is fine when it simulates the gel, which is supposed to follow the content.
I could counteract it with yet other conditions and code branches, all with a performance cost I didn’t even tried to implement, but keep in mind that the backdrop has a zoom function that you can use by hand when content zoom is enabled to position it exactly where you want.
I can’t see why this isnt possible. Aspect issues need to be dealed with outside of the shader by padding the png image with blank space (or crop existing padding, or pre-resizing) to make it fit in the virtual tube, as it will be stretched to its dimensions.
As per the unsolvable issues, we’ll have to make the choice of accepting them or roll back to the previous behaviour; testing is the purpose of the branch, after all; if it’s 2 steps forward, one step back, then I’m fine with it; but if it complicate things, we can just ditch it.
Maybe you got me wrong, I’m not asking for a new blending mode, I just tried to use the existing modes, and tried increasing and decreasing the backdrop amount, but none of that takes effect over the backdrop image unless “Display only on content” is enabled. A tiny bit confusing, but I can totally live without it 99% of the time.
Alright this might fix it, I’ll give it a try.
I’d say we’re 4 steps forward. Your effort is very much appreciated and I hope this branch will get merged into the main one soon.
Thank you for the hard and amazing work.
EDIT:
Thank you for the suggestion, it worked beautifully:
I’m very happy now.
@kokoko3k - couldn’t do much testing of the branch, but really seems to be fit for purpose, immediately looks beautifully - many thanks!
PLUS: So many thanks to @Starman99x for explaining the correct application of MAME lay files. Invaders Deluxe looks absolutely stunning with the additional overlay!
Bonus question to @kokoko3k - example Invaders Deluxe: The Backdrop runs over the entire width, whereas the monitor is vertical in the middle. Right now, I can only either blow up the screen (screenshot 1) or set up the screen correctly - with a far too small backdrop (screenshot 2). This means that the geometry of the backdrop should not be identical with the geometry of the screen. Just asking
.
Try these steps:
- First we need to prepare the backdrop image in a photo editor:
- Make your space invaders backdrop fit inside 4:3 aspect, the way you want the final result to be, but inside a 4:3 aspect.
- Take your horizontal 4:3 background (e.g.,
1440 x 1080) and add padding to the top and bottom until it becomes a 3:4 portrait shape (the aspect of the game). - The math:
1440 x 4 ÷ 3 = 1920so we need a new canvas size of1440 x 1920 - Now rotate the image 90 clockwise for koko-aio
Before:
After:
- Now in koko-aio, set the main aspect ratio to 3:4 or to the rotated preset -6.
ASPECT_X = "3.000000" ASPECT_Y = "4.000000"
- Enable Override Game Geometry, then set the override Aspect to below zero: -0 / -1 aka the internal core aspect so the game content goes back to normal.
DO_GAME_GEOM_OVERRIDE = "1.000000" GAME_GEOM_ASPECT = "-0.010000"
- Adjust the Mid-overlay zoom until the backdrop fills the bezel:
BACKDROP_ZOOM = "1.783491"
Result:
The downside to this method is improper reflections. So I prefer to just cut the backdrop into a 3:4 aspect instead:
It looks beautiful. Maybe we can come up with a better workaround, idk. But judging from your screenshots you don’t seem to be relying on reflections to begin with, so I assume this solution is perfect for your presets. Overall I really hope we won’t ditch the new changes, I think the shader is better now with room for improvements.
I’m sorry, but I’m not sure to undetstand.
Backdrops (cabs with the mirror trick) are intended to be rendered on the whole screen, not just on the content, and the behaviour of that hasn’t been changed since the very first implementation, i think. So if it is acting differently now, it has to be a bug. Is that the case?
Wops, nice find, but I think it is fixable.
This “issue” only happens with rotated games. Their aspect ratio is essentially 3:4, while the backdrop needs to be displayed in 4:3 to appear “full”. You can’t do this without workarounds if you want to enable “Display only on content” hence my solution above. And I don’t think this is a bug, it’s just something we have to deal with. I don’t recall that this was different in the main branch, not sure.
Reflections on the wrong side is clearly not intended, hence a bug to be fixed.
My other point is that “backdrops” require a blend function unavailable when “display only on content” is enabled so would not match the real thing.
Display on content should be used just for glue,ambient reflections and so on.
This should be fixed now.
Since there were unrelated things to fix in main, I just merged it now before fixing them, to prevent possible oversight merge errors.
If in need, please test main branch from now on.
It seems the res-switch glitch feature is not working with glcore, but it works fine with vulkan.
Uhm, working fine here with both.
What setup are you facing this on? (rom,core,preset, savestate to the point it should happen, anything else useful?)
And if possible, since when?























