RetroPie cocktail shader

sure, i’d be interested in seeing your modifications.

Hmm, looks fine with Stella here on my end.

So looking back, i was drunk off my ass last night. I would not classify this as ‘intrusive’ per se :). Here are the parameter settings that eventually worked for me:


#pragma parameter height "CocktailTable Image Height" 0.99 -3.0 3.0 0.01#pragma parameter width "CocktailTable Image Width" 1.99 -5.0 5.0 0.05
#pragma parameter separation "CocktailTable Image Separation" -0.45 -2.0 2.0 0.005
#pragma parameter zoom "CocktailTable Zoom" 0.5 -2.0 5.0 0.01
#pragma parameter location_x "CocktailTable Location X" 0.0 -1.0 1.0 0.01
#pragma parameter location_y "CocktailTable Location Y" 0.0 -1.0 1.0 0.01

And the modified main() block:


void main()
{
    output_dummy _OUT;




    //fix for clamping issues on GLES
    vec2 fragCoord1 = TEX0.xy * InputSize / TextureSize * vec2(0.9999);
    vec2 fragCoord2 = TEX1.xy* InputSize / TextureSize * vec2(0.9999);


    if ( fragCoord1.x < 0.9999 && fragCoord1.x > 0.0001 && fragCoord1.y < 1.9999 && fragCoord1.y > 0.
4001 )
    {
        _c0005 = TEX0.xy + vec2( location_x, separation + location_y);
        _TMP0 = COMPAT_TEXTURE(Texture, _c0005);
    }
    if ( fragCoord2.x < 0.9999 && fragCoord2.x > 0.0001 && fragCoord2.y < 1.9999 && fragCoord2.y > 0.
4001 )
    {


        _c0007 = TEX1.xy + vec2( -location_x, separation - location_y);
        _TMP1 = COMPAT_TEXTURE(Texture, _c0007);
    }
    _OUT._color = _TMP0 + _TMP1;
    FragColor = _OUT._color;
    return;
}

I have never dealt with anything like shaders before, but the syntax looks like C/C++. If thats the case whatever is in the repo now looks like it has a bug with those if statements. Additionally the y coordinate cutoffs pretty much ended up cutting off the image (looks like it may have been OK for a 4:3 aspect ratio?) and NOT fixing that clamping issue, so I had to adjust those as well. Having basically no understanding of what things did, this ended up being a two-hour needle in haystack situation :(.

And sorry, I guess I hadn’t fully reverted when testing the atari stuff. My modifications definitely do NOT work on the atari emulator, however simply removing the if statements from the stock version seem to work just fine. Interesting…

Yes, the syntax is C-like, which is nice. The if statements are just meant to blank the pixels near the edges of the images because any pixels that are actually touching the edge will bleed off to infinity. If you can get rid of them without that happening, go for it.

Sorry to revive an older thread but I’m having trouble getting this to work. I’m running on a pi 3 model b. My screen is a 1366x768 native resolution.

I have the shader downloaded and when I fire up a game, say the punisher on fba. I press f1 go to quick menu>shaders and set shader 0 to cocktail-cab-portrait.glsl then go to preview shader parameters and it goes back out to the attract mode front end. What the heck am I doing wrong?

Thank you. I disabled threaded video and it no longer crashes the emulator when I open preview shader parameters. However there are no parameters to adjust in that menu or the parameter presets menu.

Hello everyone! I was looking through the internet with the same question and found your discussion. I have made an arcade barrel few days ago (using Raspberry Pie 3b and RetroPie) and have problems with screen mirroring.

You are talking about cocktail-cabinet.glsl file. Were can I find it because there is no such in my default Video Shader Files list. I am using 17’’ lcd monitor with 4:3 proportion. Is it possible to make a good splitscreen on it?

Hey! Looks awesome!

There’s no preset for the cocktail cabinet shader. You have to load it instead by incrementing the number of passes from 0 to 1 and that will make some new lines appear. Where it says shader pass #0 N/A, you can navigate to the ‘misc’ subdirectory of your shader directory and you should see “cocktail-cabinet.glsl”. Load it up and then hit ‘apply shader changes’ at the top of the shader menu and it should take effect.

However, your 4:3 monitor will split down to 3:2 per side, which is pretty fat. It’s worth a shot, though.

1 Like

I posted my configs here.

1 Like

Thanks a lot everyone for your help! I will try to do everything you told and share result with you!

Hi again everybody! Few days have passed since I’ve been trying to succeed with these shaders. Thank’s for the information from hunterk and download link from goldfinger007! I’ve downloaded those 3 cocktail-cab-portrait files you provided. One for SNES, one for NES and the last one for MAME I suppose. Everything is great with SNES cocktail after I’ve played with shaders preview. You can see how it looks like on Aladdin game: As for NES, I have a problem like putting 2 images on each other so it looks not as supposed:

Was trying to use the same parameters like with SNES but it’s failed as you can see. Please, help me, what I am doing incorrect?

SNES looks good!

NES should be able to use the same settings as SNES, since they’re both typically 256x224.

Hello everyone! 2 weeks have passed since my last message and I still don’t have any success with NES cocktail mode:( I feel like I was trying everything you suggested but without any result! What am I doing incorrect? Please, help me! :disappointed_relieved:

Hey, I just pushed up some changes to the shader that will hopefully fix your issues.

1 Like

Dear hunterk! Thanks for help and support! Where can I download this shader with your recent changes? I used glsl shaders which goldfinger007 provided few posts ago.

You should be able to get it by using the online updater within RetroArch.

1 Like

I don’t know what did you do, but now I am 99% closer to final target! :smiley: :+1:

As you can see on the photo it stretches image to the entire screen now but put part of the screen on each other in the middle so there is overlay. I was operating with Preview Shader Parameters all day and night but feel that is not possible to separate them without cutting picture.

Please, can you help to figure out with this? :face_with_head_bandage:

If your monitor and menu are both in the normal, landscape orientation, don’t use the portrait version, use the normal version. Here are my settings to get a doubled NES image on a 4:3 aspect ratio:

If you’re going to be using the monitor and the menu in portrait mode (e.g., if you use your operating system to rotate the image completely), use the portrait version of the shader. Here are my settings to get a doubled NES image on a 3:4 (i.e., portrait) aspect ratio:

1 Like

Hello again! I want to say THANKS to hunterk and goldfinger007 for you help and support! Looks like I have finally figured out with NES, SNES and SEGA systems! Unfortunately, look’s like there is no retroach options for MAME, so I don’t know how to make mirrored split screen there. May be you will give me one more advice, but I am already happy!!!:blush: THANK YOU!

Hey, looks great! I’m glad you got it worked out.

For MAME, you should be able to handle it just like the others, but I think the latest MAME (the one without any year after the name) might have a cocktail mode built-in through the MAME OSD menu. I don’t know much about that, though.

1 Like