-
AuthorPosts
-
Anonymous
Inactive03/05/2015 at 21:13Post count: 94Is there any shaders that replicate the GB display that dont effect performance on the RPi for the Gameboy emulator?
No. All shaders come with a performance hit. That said, I use the bead shader and an overlay and it runs at full speed, I don’t notice any lagging on a RPi 2 model B. I messed with shaders on the older B+ before the 2 came out and I found that the older Pi’s just didn’t have enough processor power to run the emulator and add shaders on top.
Here’s my /opt/retropie/configs/gb/retroarch.cfg for 1920 x 1200 resolution
# All settings made here will override the global settings for the current emulator core video_shader_enable = true video_shader = /opt/retropie/emulators/retroarch/shader/bead.glsl input_overlay_enable = true input_overlay = /opt/retropie/emulators/retroarch/overlays/gb.cfg input_overlay_opacity = 0.70 input_overlay_scale = 1.0 aspect_ratio_index = "22" custom_viewport_width = "645" custom_viewport_height = "648" custom_viewport_x = "637" custom_viewport_y = "275"
and here’s a cfg that works for 1920 x 1080 (1080p) resolution
# All settings made here will override the global settings for the current emulator core video_shader_enable = true video_shader = /opt/retropie/emulators/retroarch/shader/bead.glsl input_overlay_enable = true input_overlay = /opt/retropie/emulators/retroarch/overlays/gb.cfg input_overlay_opacity = 0.70 input_overlay_scale = 1.0 aspect_ratio_index = "22" custom_viewport_width = "642" custom_viewport_height = "581" custom_viewport_x = "638" custom_viewport_y = "248"
I’m using the overlays from http://retroarchborders.blogspot.com
Thanks to Roos suggested config, I’ve had a go, and think these overlays look pretty good.
Here is my config:
video_shader_enable = true video_shader = /opt/retropie/emulators/retroarch/shader/bead.glsl input_overlay_enable = true input_overlay = /opt/retropie/emulators/retroarch/overlays/gb.cfg input_overlay_opacity = 0.70 # 1.0 input_overlay_scale = 1.0 aspect_ratio_index = "22" custom_viewport_width = "432" custom_viewport_height = "389" custom_viewport_x = "423" custom_viewport_y = "165"
Hi floob, haven’t seen you for a while :) nice video!
Anonymous
Inactive03/06/2015 at 21:38Post count: 94is there a way to add the ‘pea green’ colour to the screen though?
I have not found a RetroArch shader in RetroPie that has the puke green color of the original GB.
On my Windows PC, the RetroArch shader “gb-shader.cgp” is a really nice shader for GB, complete with puke green color. But cgp shaders are not compatible with RetroArch on Pi which uses *.glsl shaders. I read somewhere they can be converted, but it never bothered me enough to spend the time to figure out how.
[quote=90329]Hi floob, haven’t seen you for a while
nice video![/quote]
Thanks, I’ve just extended it.
Also, looks like conversion steps are here:[quote=79662]It is necessary to convert cg shaders to glsl shaders. To do this you need the nvidia cg toolkit. The toolkit is only available for x86 platforms. So you need a ubuntu live cd and a PC to convert a shader.
If everything is installed download and run cg2glsl.py:
https://github.com/libretro/RetroArch/blob/master/tools/cg2glsl.py
[/quote]
Yep – that’s where I read about converting cgp to glsl. I gave up when I saw that it required a Ubuntu x86 desktop :) I figured after a bunch of work, I would just end up with an over-aggressive shader for the Pi’s limited resources.
I don’t know much about cgp vs glsl…? Is it just the difference between linux and windows retroarch installations?
Edit – I see now. glsl is the standard for arm-based libretro
Surprise surprise!
https://github.com/retropie/RetroPie-Setup/pull/722[quote=90491]Surprise surprise!
https://github.com/retropie/RetroPie-Setup/pull/722
[/quote]That’s awesome gizmo98, thanks for converting them all!
I downloaded them to my pi, set owner and group to pi, set them all as executable, and pointed RA to them. Some work, some don’t.
For example, I updated /opt/retropie/configs/all/retroarch.cfg
video_shader_dir = /opt/retropie/emulators/retroarch/convertedshaders
And /opt/retropie/configs/gb/retroarch.cfg
video_shader = /opt/retropie/emulators/retroarch/convertedshaders/handheld/gameboy/gb-shader.glslp
But when I launch RA, I get this:
pi@retropie ~ $ /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/gbclibretro/gambatte_libretro.so --config /opt/retropie/configs/all/retroarch.cfg --appendconfig /opt/retropie/configs/gb/retroarch.cfg "/home/pi/RetroPie/roms/gb/Tetris (World) (Rev A).gb" RetroArch: rarch_log_libretro: [libretro INFO] :: Plain ROM loaded. RetroArch: rarch_log_libretro: [libretro INFO] :: cgb: 0 RetroArch: rarch_log_libretro: [libretro INFO] :: rambanks: 0 RetroArch: rarch_log_libretro: [libretro INFO] :: rombanks: 2 RetroArch: rarch_log_libretro: [libretro INFO] :: [Gambatte]: Got internal game name: TETRIS. RetroArch [ERROR] :: compile_program :: Failed to link program #0. RetroArch [ERROR] :: compile_programs :: Failed to create GL program #0. RetroArch [ERROR] :: gl_shader_init :: [GL]: Failed to initialize shader, falling back to stock. RetroArch [WARN] :: gl_glsl_init :: [GL]: Stock GLSL shaders will be used.
Maybe I’m missing something? But I’m thinking the convert script didn’t work on this one… I looked at the glsl code, but I don’t see anything that stands out. I’m a pretty noob programmer though.
So close! I’m really hoping we can all work together to figure this out :) RetroPie would rock with some nicer shaders!
Some do not work because the raspy gpu is not capable. I strongly recommend using RGUI for shader experiments because ini file editing takes too long.
I have tested some blur, eagle, sai, pixilation and crt shaders. Only some gameboy shaders are running fine.
It’s actually much easier and faster for me to modify the cfg files :) To each their own.
Just FYI, there was some issue with finding the files before. I was able to get around that by pointing RA directly to the full path. Here’s where I’m at now.
/opt/retropie/configs/gb/retroarch.cfg
# All settings made here will override the global settings for the current emulator core video_shader_enable = true video_shader_dir = /opt/retropie/emulators/retroarch/convertedshaders/handheld/gameboy video_shader = gb-shader.glslp
and when I launch RA i get this
pi@retropie ~ $ /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/gbclibretro/gambatte_libretro.so --config /opt/retropie/configs/all/retroarch.cfg --appendconfig /opt/retropie/configs/gb/retroarch.cfg "/home/pi/RetroPie/roms/gb/Tetris (World) (Rev A).gb" RetroArch: rarch_log_libretro: [libretro INFO] :: Plain ROM loaded. RetroArch: rarch_log_libretro: [libretro INFO] :: cgb: 0 RetroArch: rarch_log_libretro: [libretro INFO] :: rambanks: 0 RetroArch: rarch_log_libretro: [libretro INFO] :: rombanks: 2 RetroArch: rarch_log_libretro: [libretro INFO] :: [Gambatte]: Got internal game name: TETRIS. RetroArch [ERROR] :: gl_glsl_init :: [GL]: Failed to parse GLSL shader. RetroArch [ERROR] :: gl_shader_init :: [GL]: Failed to initialize shader, falling back to stock. RetroArch [WARN] :: gl_glsl_init :: [GL]: Stock GLSL shaders will be used.
I still say the conversion script didn’t work on this shader due to “gl_glsl_init :: [GL]: Failed to parse GLSL shader.”
[quote=90529]Some do not work because the raspy gpu is not capable. … I have tested some blur, eagle, sai, pixilation and crt shaders. Only some gameboy shaders are running fine.[/quote]
Have you got any of the converted multipass shaders to work (glslp vs glsl)? I’ve only spot checked a few, but I have yet to see any of these working.
ok, I’ve hacked up a solution
I found that convertedshaders/handheld/gameboy/shader-files/gb-pass-1.glsl through 4 were working. gb-pass-0.glsl is the one that gives RA fits.
According to the author’s git page https://github.com/HarlequinVG/shaders/tree/master/gameboy_shader, pass 0 is for the dot-matrix screen of the GameBoy.
Then I noticed that convertedshaders/handheld/dot.glsl was working :) So I substituted dot.glsl for gb-pass-0.glsl as the 1st pass in gb-shader.glslp
I’ve attached my files for anyone who likes the results. Copy “dot.glsl” and “gb-shader.glslp” from the attached zip to /opt/retropie/emulators/retroarch/shader (overwrite the originals), set the files as executable, and change owner and group to pi.
Then with this /opt/retropie/configs/gb/retroarch.cfg you should be set
# All settings made here will override the global settings for the current emulator core video_shader_enable = true video_shader = /opt/retropie/emulators/retroarch/shader/gb-shader.glslp input_overlay_enable = true input_overlay = /opt/retropie/emulators/retroarch/overlays/gb.cfg input_overlay_opacity = 0.70 input_overlay_scale = 1.0 aspect_ratio_index = "22" custom_viewport_width = "642" custom_viewport_height = "581" custom_viewport_x = "638" custom_viewport_y = "248"
The picture doesn’t do it justice. It a nice simulated dot matrix grid pattern with a lovely puke green color.
[edit] after some more testing, I’ve noticed it does lag a bit… :(
Thanks so much for the conversions! I’ve put an updated video up here (on a B+):
I played about with the setup a bit as I’ve only pulled down the shaders I was after, I’m not too sure this would be straightforward for some users though.
I think the easiest way would be to follow Roos instructions above (and use his edited files), although I think you will also need to get the 4 shader files (not 0) here https://github.com/gizmo98/RetroPie-Setup/tree/7fa6d471361ff882bcfb2bdc11e20e4b438ef064/supplementary/RetroArchShader/handheld/gameboy/shader-files
As well as putting the 2 png files here in your working (shader) directory:
https://github.com/gizmo98/RetroPie-Setup/tree/7fa6d471361ff882bcfb2bdc11e20e4b438ef064/supplementary/RetroArchShader/handheld/gameboy/resourcesDid you test yours on a Pi2 Roo?
It seems the framerate drops from 60 to 30 when the gb-shader is used (on a B+ at High overclock).Yes, Pi 2 model B, overclocked to “Pi2” setting. It’s lagging just enough to be annoying. Can you see it in this comparison?
Yes, it does seem a little sluggish. Can you turn the FPS monitor on via RGUI? Does it differ from 30fps on the gb-shader ?
I dunno what secret sauce you’re pouring on your Pi B+…
I’m getting around 45 FPS with just dot.glsl and around 13 FPS with gb-shader.glslp on a Pi2 OC’d to Pi2 setting
Anonymous
Inactive03/08/2015 at 11:19Post count: 94Great work!!. If anyone interested I’ve made numerous GB, GBC and GBA system overlays from pictures found on the web, I’ll upload them later
[quote=90592]Great work!!. If anyone interested I’ve made numerous GB, GBC and GBA system overlays from pictures found on the web, I’ll upload them later[/quote]
Would be good to see those, the handhelds do look good with these overlays.
Even if it does seem to open a can of worms about exactly what resolution these should be played in :)I used these that Roo pointed to:
http://retroarchborders.blogspot.com/Anonymous
Inactive03/08/2015 at 16:45Post count: 94[quote=90639]Here you go
https://www.dropbox.com/s/xqd4crkihlpfidl/Nintendo%20Handhelds.rar?dl=0
[/quote]
They look great, thanks very much.I just can’t get the shader to work.
I followed everything on this topic, used all the files and edited my gb cfg file.cfg file:
video_shader_enable = true
video_shader = /opt/retropie/emulators/retroarch/shader/gb-shader.glslpinput_overlay_enable = true
input_overlay = /opt/retropie/emulators/retroarch/overlays/gb.cfg
input_overlay_opacity = 0.70
input_overlay_scale = 1.0aspect_ratio_index = “22”
custom_viewport_width = “642”
custom_viewport_height = “581”
custom_viewport_x = “638”
custom_viewport_y = “248”here is the gb-shader.glslp file:
shaders = 5
shader0 = shader-files/dot.glsl
shader1 = shader-files/gb-pass-1.glsl
shader2 = shader-files/gb-pass-2.glsl
shader3 = shader-files/gb-pass-3.glsl
shader4 = shader-files/gb-pass-4.glslscale_type0 = viewport
scale0 = 1scale_type1 = source
scale1 = 1scale_type2 = source
scale2 = 1scale_type3 = source
scale3 = 1scale_type4 = source
scale4 = 1filter_linear0 = false
filter_linear1 = false
filter_linear2 = false
filter_linear3 = false
filter_linear4 = falsetextures = COLOR_PALETTE;BACKGROUND
COLOR_PALETTE = resources/palette.png
COLOR_PALETTE_linear = false
BACKGROUND = resources/background.png
BACKGROUND_linear = trueI store my shaders in opt/retropie/emulators/retroarch/shader/
also in opt/retropie/emulators/retroarch/shader/shader-files/In both those folders are the png files and also in
opt/retropie/emulators/retroarch/shader/resources/If I just change the shader in the gb cfg file to dot.glsl it works but without the green color. I tried changing the shader option in the emulator itself by pressing hotkey + F1 > options > shaders, but that doesn’t do a thing.
I use a RPI1 model b
Please help me.
Cheers
Do these files and paths exist for you – as they are referenced in your file above?
shader-files/gb-pass-1.glsl (etc..)
resources/palette.png
resources/background.pngIt could be easier for you to drop the paths above and just put the files in the same directory.
Yes they all exist, another problem is when booted up a gameboy rom with the border on Retroarch keeps those settings for the other roms like Nes roms display in the bottom right corner of my tv screen until I change the ratio within retroarch.
Fixed the palette problem, but it can’t open the background.png strangely enough they are in the same folder.
Fixed2 ratio issue: forgot to put save per core on enable :s
Where you state your “cfg file:” file above, that should be
/opt/retropie/configs/gb/retroarch.cfg
Is that where you have put the entries?Make sure the user pi has access to the files mentioned above as well.
the shaders are in /opt/retropie/emulators/retroarch/shader
and the retroarch.cfg is in the folder you have mentiont above.Can someone upload the background.png again?
It seems that some files will work and some don’t as in the palette.png wokrs but other palette files like dmg-palette-1.png doesn’t work.You can grab the images you need here:
https://github.com/libretro/common-shaders/tree/master/handheld/gameboy/resourcesWhooowee, wish I’d found this thread a couple of days ago.
I also did a manual conversion of the shaders and posted a .tar.gz here: http://www.kf5rsx.com/retroarch-quick-glsl-shader-recompile/
It’s basically the exact same thing gizmo93 put up on github, whoo!I’ll have to look closer at all this later, I’m really interested in getting good GB shaders too, as well as GBC. lcd-shader is ok, but looks better for something like Game Gear instead of GB/GBC IMO.
[quote=90824]
Fixed the palette problem, but it can’t open the background.png strangely enough they are in the same folder.
[/quote]Sorry for necroing this thread but this has been driving me mad for two hours now. How did you fix the palette problem? No matter what I try I cannot get the colour to work. I’m using the modified files from roo above, but changed for my own purposes, plus i’ve made sure all the paths are correct and the palette.png file is in the right place. No matter what, when I start I get errors in the runcommand log:
RetroArch: rarch_log_libretro: [libretro INFO] :: [Gambatte]: Got internal game name: WIZARDS WARRIORS. RetroArch [WARN] :: resolve_extensions :: [GL]: GLES implementation does not have BGRA8888 extension. 32-bit path will require conversion. RetroArch [ERROR] :: compile_program :: Failed to link program #1. RetroArch [ERROR] :: compile_programs :: Failed to create GL program #1. RetroArch [ERROR] :: gl_shader_init :: [GL]: Failed to initialize shader, falling back to stock. RetroArch [WARN] :: gl_glsl_init :: [GL]: Stock GLSL shaders will be used. RetroArch [WARN] :: resolve_extensions :: [GL]: GLES implementation does not have BGRA8888 extension. 32-bit path will require conversion. RetroArch [ERROR] :: compile_program :: Failed to link program #1. RetroArch [ERROR] :: compile_programs :: Failed to create GL program #1. RetroArch [ERROR] :: gl_shader_init :: [GL]: Failed to initialize shader, falling back to stock. RetroArch [WARN] :: gl_glsl_init :: [GL]: Stock GLSL shaders will be used.
this is on retropie 3.0 BETA 3 on a pi2, using the stock emulator choice for gb.
Can anyone assist?
nvm fixed it.
on 3.0 beta 3 its just a matter of copying dot.glsl into
/shader-files
and then editing the gb-shader.glslp thusly:shader0 = shader-files/dot.glsl
then set your shader as normal in retroarch.cfg, or using the in-emu retroarch gui menu.
Anonymous
Inactive06/28/2015 at 00:35Post count: 94How do you get glslp shader config to work with RetroPie??, i select ‘load shader preset’ and then select the glslp shader but nothing happens?
[quote=100868]How do you get glslp shader config to work with RetroPie??, i select ‘load shader preset’ and then select the glslp shader but nothing happens?
[/quote]
Yeah :( I am having the same issue
@LodanZark
Update retroarch. There is a gameboy shader in the main shader directory now.For those having issues setting it up or not getting it working, I discovered last night in the QUICK MENU and CORE SETTINGS that in lr-gambette you can emulate GameBoy colors without shaders and still achieve practically the same effect of the muddy green color which is all I wanted and now I have achieved it :D
Hi,
Thanks for all the informations you provided in this topic. This was driving me mad for two weeks. But i’m curious: why bother including shaders in the Retropie distribution that are known to be crashing on the Raspberry Pi and Pi 2 ?
Couldn’t we just remove all the useless and misleading shaders that we cannot use ? -
AuthorPosts
- The forum ‘Video Output on RetroPie’ is closed to new topics and replies.