Cocktail Shader Rotation
Hi all, i have an unusual problem i need help with.
What i would like to know, is it possible to make give a command to make a shader rotate. Or to stop it from rotating.
I have a cocktail table that i have placed a Pi 3 into (controls either side), and have an image running attract mode, and have assigned two buttons to select different shaders. The purpose of this is to switch between full screen 1 player mode and mirrored mode for 2 players.
(deleting all but two glslp files accomplishes this)
For two players i use the cocktail shader incuded in the retroarch download area. but when applied, it automatically rotates the screen 90 degrees. (i assume it does this to fill the screen completly) Thus pointing the screens to the ends of the table that have no controllers.
I realize that the default answer for this could be to go into the retroarch settings and rotate the screen to the desired angle, however this would also rotate the 1 player image.
I have also tried disabling the rotation whatsoever in the config files. but this has no effect.
Can i edit either shader to rotate?
Can i edit the cocktail table shader not to rotate?
Is there any other way around this problem i haven't thought of?
I'd appreciate any help i can get, thanks for your time. :-)
@chirpy If it is indeed the shader that does the rotate, seems like you could edit the shader code and stop it from doing so.
Thanks for the reply, but unfortunately my knowledge of these things are limited.
I've opened the cocktail-cabinet.glsl file and taken a look, but even though the word rotation is featured several times, i dont see any obvious way to understand it, let alone change it. :-(
@chirpy May I ask, what are you trying to achieve with the shader you downloaded?
I built my cabinet which is basically a 4 player cocktail setup. It has controls on the opposite vertical ends and two controls along a horizontal edge. The design allows side-by-side gaming along the third, long-edge panel, but mostly, it is intended to be used in true "cocktail" mode for classics like PacMan and Donkey Kong with player1 and player2 on opposite ends. There is no need for a special shader.
@caver01 Oh, I see, you want mirrored gameplay.
@caver01 What emulator are you using? With MAME, you can usually configure the ROM's DIP switch for Cocktail Mode so it will actually FLIP the image for player 2. Using this, I don't ever need to use any mirroring. Of course, this is exclusive to arcade games.
I have looked at this option using mame2010. But i've been searching for a more 'universal' option for not just arcade games.
It'd be great for the function to go mirrored on everything from metal slug to nes games. :-)
caver01 last edited by caver01
@chirpy Understood. What about deploying your shader (I assume via retroarch.cfg files), but then adding a line in the config to rotate it back? The configs could be per-rom, so you aren't changing it on the fly, but a custom config per game.
Sounds interesting. What would the correct 'line in the config' be?
# Forces a certain rotation of the screen. # The rotation is added to rotations which the libretro core sets (see video_allow_rotate). # The angle is <value> * 90 degrees counter-clockwise. video_rotation = 0
So, basically you set the value of this line to 1, 2 or 3, and with a little trial and error, you can get the rotation the way you need.
It didnt work. The rotation command did work. but it rotated both shaders, meaning 1 of them were always pointing to the side.
Is there any command to refer directly to a shader?
@chirpy probably within the shader. Sorry. You will have to learn OpenGL shader code I think. There are resources online (I searched for them once) but it is beyond my abilities. It may be worth asking on retroarch/libretro forums. It's not really a RetroPie thing.
Fair enough, i'll give that a try. If i get any solutions i'll be sure to post back here anyway.
Thanks for your time.
Thought last edited by
Any luck? Also, (I'm new to RetroPie) what are the steps you took to get the cocktail shader? I've been looking around, but have yet to figure out how to find it, let alone get it running. Help?