Issues Configuring Shaders on Retroarch for Raspberry Pi

Hello, I seem to be unable to configure the parameters of any shader on Retropie for Raspberry Pi. Video guides show a huge list of parameters to modify and preview to correct screen size issues etc, but whenever I try and change these settings I only see “no parameters available.”

Is parameter editing something currently missing from the raspberry pi version of retroarch?

The shaders are converted from CG to GLSL using an automated script that doesn’t yet support parameters. There are a few hand converted shaders under the hunterk folder. I guess some of those should have parameters.

Thank you. I can’t seem to find the hunterk folder. Coincidentally it is one of their shaders I want to use, the cocktail mode shader. I’ll keep poking around.

Where did you get the shaders? In our glsl package it’s included http://buildbot.libretro.com/assets/frontend/shaders_glsl.zip

Updating within Retroarch on my pi. There does seem to be a huge difference in the lists. Unfortunately though the cocktail machine shader isn’t in the Hunterk folder, just the regular misc. How would one go about converting this manually so the parameters can be changed on the raspberry pi?

oh wow, I hadn’t fixed that one because I didn’t figure anyone really used it. I’ll take care of it and reply or update this post when I finish.

EDIT: Okay, all set. It should be in the updater at some point, or you can download it from here:

It works! This is great. There are some artifacts on the edges of screens and a bit of discoloration, but I can live with it. Thank you so much for taking the time to convert this. I’ll be sharing this on reddit I’m sure there would be people interested there.

If you can get me a screenshot of the artifacts/discoloration, I might be able to do something about it.

Out of curiosity, what do you plan on doing with it? Homemade cocktail cabinet? :slight_smile:

I have no idea how I would take a screenshot from in my Pi i’m still pretty novice in that regards to linux. Was my first time using wget downloading this to the Pi. I will however take pictures of the screen as a middle ground.

That is the plan, ever since I played a pacman cocktail table I knew I had to have one. Then I got the idea of the mirrored screen from somebody online so I can play games that were not intended for this type of screen. Which led me to finding your shader.

One issue in particular right now is that the limits to the parameters don’t give enough headroom to move things over properly. Also it would be nice if you could move the mirrored screens on the x axis in addition to the y axis.

Another thing… Is there a recommended aspect ration/resolution to use? Currently testing on an HDTV at 1080p with forced aspect ratio to 16:9. Will be using an IPS monitor for the actual machine.

EDIT: It seems that the lines only appear when the “tops” of the two screens touch, and it is a scrolling part (as opposed to a static main menu for example)

Ah, yeah, sounds like that’s just where the two images overlap. Just fiddle with the parameters until they don’t overlap anymore and you should be set.

Ok, redownload it and give it another shot. I doubled the outer limits on the options and added X-axis location adjustment.

Sounds like a fun project! Forcing aspect to 16:9 is indeed what I had in mind for the shader, and any 16:9 res should do, including 1080p. I’d love to see some pics of the finished product, if you care to share them. :slight_smile:

I will certainly update you as soon as I have the new one installed :slight_smile:

Okay, no pictures or anything yet. The X-axis adjustment works, but it adds black bars on the left and right hand sides (viewing the screen normally) as you adjust it, cutting off the image. The only way to get both plays screens showing requires them to overlap because of this. If you need me to I can make a video of me making the adjustments so you can see what I mean.

Ah, I see what you mean. Try it one more time. I added a ‘zoom’ parameter that will hopefully get around that. So, you can use the zoom and location_x/y to get them both onscreen and then use the height/width to get the images’ aspect ratio worked out. Height may end up being superfluous in this case, actually.

Hi sorry for not replying for months… I got a bit sidetracked with life. I am finally building my actual arcade though, and will be able to test the rotation tomorrow, I’ll let you know how it goes, and will of course post pictures. I am using a Raspberry Pi 1 Model B, so if I am having issues, I’ll test again when I have a Pi 3, which I should be ordering this week.

Edit: Before I started building my cabinet I installed the newest version of retropie. Since then I am unable to change the parameters to any shader, when I try in any emulator, it just kicks me out to the frontend. I will have to try playing with some settings. The cabinet is at my brothers house, will report back.

This kind of cocktail project is exactly what I’m going for too. Having that ‘cocktail mode’ is what made me want to go ‘all in’ on a cocktail cabinet. Thanks for the post!

Hi hunterk, I’ve been playing around with this cocktail shader for a couple nights and have been unable hack my way to a clear screen. Would you mind looking at my screenshots? The intro screen looks perfect! But once the game starts, I get a faded image and all those ugly vertical bars.



Did some more hacking… if I make the following change to that glsl…

_TMP0 = COMPAT_TEXTURE(Texture, TEX0.xy / ZOOM);
_TMP1 = COMPAT_TEXTURE(Texture, TEX1.xy / ZOOM);

// _color = _TMP0 + _TMP1; _color = _TMP0; FragColor = _color;

It seems each screen is also drawing those extra lines ‘above’ itself causing a washed out image for the ‘other’ one. Thus, without drawing both, it looks perfect!


Yes, that’s exactly what’s happening. It’s an issue with the way GLES handles clamping vs full OpenGL. I had to do an ugly hack around that issue with the side-by-side shaders, and I think the same thing would work here.

Try replacing those _TMP0 and _TMP1 lines with this:


vec2 fragCoord1 = TEX0.xy * InputSize / TextureSize;
vec2 fragCoord2 = TEX1.xy* InputSize / TextureSize;

_TMP0 = vec4(0.0);
if ( fragCoord1.x < 1.0 && fragCoord1.x > 0.0 && fragCoord1.y < 1.0 && fragCoord1.y > 0.0 )
_TMP0 = COMPAT_TEXTURE(Texture, TEX0.xy / ZOOM);
_TMP1 = vec4(0.0);
if ( fragCoord2.x < 1.0 && fragCoord2.x > 0.0 && fragCoord2.y < 1.0 && fragCoord2.y > 0.0 )
_TMP1 = COMPAT_TEXTURE(Texture, TEX1.xy / ZOOM);

YEEEEEEESSS!! That totally worked!!


Thanks! Joe

Ah, good :slight_smile:

I’ll make that change in my repo, then, so it doesn’t trip up anyone else in the future.

Thanks again for the help. Here’s a shot of the finished product.


The one nagging issue I have is that the emulation station screen is never rotated, so you gotta tilt your head when picking the game. My plan was to…

  1. Change the raspi boot config under /boot/config.txt to rotate the screen ‘globally’ and then…
  2. Modify your glsl to not perform the rotation

I tried reversing various x/y variables in that glsl, but haven’t come up with a way for it to skip the rotate. Do you have an easy trick for that?