Retroarch shaders & slowdown

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 10 replies, has 4 voices, and was last updated by Profile photo of Billy T. Pilgrim Billy T. Pilgrim 2 years, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #84795
    Profile photo of Billy T. Pilgrim
    Billy T. Pilgrim
    Participant

    Hi all, first post so I’ll try not to make too much of an arse of myself. Cross-posted this to the Pi forums too, so hopefully someone will be able to help me out!

    I’m building a multi-console beast in an old PS1 case, and I’m a reasonable way in. I’m using retroarch for almost everything I can, partly so that there are the shiny shaders to give an authentic look.

    Now, Retroarch on the Pi doesn’t seem to like any of the cg shaders which are kicking around, so I managed to get cg2glsl.py running and converted the cgwg’s crt-interlaced-halation shader, which looks GORGEOUS (see attached screenshot).

    It slows the system right down though, to the point where I’m getting ~13fps on NES games and around 9fps on the SNES.

    I will be overclocking the s**t out of this thing once I get a decent cooling system, so hopefully that’ll alleviate a lot of the slowdown, but does anyone know of a way of reducing the overhead of these things?

    I’m not expecting miracles, I know that to gain speed you have to lose quality – the main bits I care about are the scanlines, the halation and the screen curvature.

    I don’t know if there are any parts of the original shader that could be chopped out to make it more lightweight, but if there are and there’s anyone willing and able to do it, I’ll love you forever and dance at your wedding.

    EXTRA BONUS FAVOUR!
    Ooh, I feel like a right scrounger now. I’ve also been trying to convert Harlequin’s Gameboy shader to GLSL, and it’s just not wanting to work. It says it’s converted alright, then refuses to load in Retroarch.

    I think it might be to do with the fact that it loads external files using a variable in the .cgp file, but I know even less about shader coding than I do about most things so take that with a grain of salt.

    So, once again, if there’s anyone who could see thei way to providing a Pi-friendly GLSL version of this shader, you, too will be on the recieving end of a tiny dance party and I’ll love you forever.

    Cheers all,
    Tom

    Attachments:
    #84800
    Profile photo of michael
    michael
    Participant

    Good luck. I went with a hardware solution and finally got it working just last night.

    Pi b+ with a gert vga666 gpio adapter out to a T-SLG v1.6 scanline generator.

    Perfect scanline without the slowdown. 🙂

    #84803
    Profile photo of Billy T. Pilgrim
    Billy T. Pilgrim
    Participant

    I did consider that for a while, there’s plenty of room in the casing – however, I decided against it for several reasons, primarily because I’ve made the (possibly foolish) decision to support a lot of original controllers*, so the circuitry to switch between them takes up almost all of my GPIO pins, and the remaining ones are devoted to a power switch and converting the Playstation’s reset button into a ‘return to menu’ button.

    *Yeah, I know you can get USB replicas. But it feels like it’d be cheating, somehow.

    #84804
    Profile photo of michael
    michael
    Participant

    gotcha. mine is running in a neogeo cabinet with a usb keyboard emulator connected to control panels. I’m only running mame and FBA for neo geo games though.

    i think on this platform you’ll have to compromise somewhere.

    (and I agree on your controller choices. I play all my console games on my mac and managed to secure a couple of super famicom controllers out of Japan that I then plug into a usb adaptor. it just “feels” right.)

    #85471
    Profile photo of dgtliqd
    dgtliqd
    Participant

    Hello billyt-pilgrim, any chance you can upload/post a copy of the crt-interlaced-halation.glsl shader you have working in RetroArch? I’ve spent a good amount of time, trying to find an already converted version and the one I did manage to find (multi-pass) doesn’t load. I get the error below when I try to load it:

    RetroArch [ERROR] :: Failed to link program #3.
    RetroArch [ERROR] :: Failed to create GL program #3.
    RetroArch [ERROR] :: [GL]: Failed to init shader, falling back to stock.
    RetroArch [ERROR] :: [GL]: Stock GLSL shaders will be used.

    The screenshot you posted is EXACTLY, the look I’m looking for.

    Much appreciated!

    #85472
    Profile photo of Billy T. Pilgrim
    Billy T. Pilgrim
    Participant

    I’ll have a look when I get home tonight, but I’ve a horrible feeling I might have deleted it. Still, I can always redo it. Do bear in mind, though, it does give a big performance hit – I was seeing 12-11fps on NES games, and that’s overclocked to 1Ghz.

    #85473
    Profile photo of dgtliqd
    dgtliqd
    Participant

    No worries. If you got it, great, if not, I’ll continue my search for the perfect CRT shader. This one is as perfect as possible, but like you stated, it comes with a performance hit.

    Have you found any other shaders that are a close second to this quality?

    Thanks again!

    #85474
    Profile photo of Billy T. Pilgrim
    Billy T. Pilgrim
    Participant

    Nothing quite as good. I’m using one of the CRT shades that came with RetroPie, crt-flat I think, with a custom overlay to fake up the slightly curved and fuzzy border and the rounded corners. I didn’t go with scanlines in the end, as I’ve not found any in software that actually improve the image. I’ll post up my overlays for you when I get home.

    #85475
    Profile photo of dgtliqd
    dgtliqd
    Participant

    Great, thanks!

    #85481
    Profile photo of Roo
    Roo
    Participant

    Good luck. I went with a hardware solution and finally got it working just last night.

    Pi b+ with a gert vga666 gpio adapter out to a T-SLG v1.6 scanline generator.

    so the circuitry to switch between them takes up almost all of my GPIO pins

    In my humble opinion, you’re asking too much from the Pi.

    I’m going with Pi B+ to HDMI to VGA adaper to T-SLG v1.6 scanline generator to 19 inch CRT in my arcade cabinet. All my GPIO pins are free.

    p.s. – thank you michael! I was about to spend a lot more on a SLG3000 from Germany 🙂

    I picked that HDMI to VGA because it has audio out and separate power in. From what I’ve read, you don’t want to be pulling 5VDC from the Pi’s HDMI port. I’m using a separate 5VDC power supply just to power the adapter.

    I have the HDMI to VGA working, but I just ordered the scanline generator. I’ll have to let you know how that works once it arrives.

    • This reply was modified 2 years, 3 months ago by Profile photo of Roo Roo.
    • This reply was modified 2 years, 3 months ago by Profile photo of Roo Roo.
    #85486
    Profile photo of Billy T. Pilgrim
    Billy T. Pilgrim
    Participant

    Well, the 3v that most old controllers need isn’t too much of a drain on the old girl, and the gubbins to switch between controller ports as they’re plugged in isn’t hard to make. It’s all doable – that said, I’m going for usb replicas after all for several reasons – as many players as you like (X-Men, I’m thinking of you), cost, saving myself effort and the fact that although using replicas seems wrong, it seems even wronger to cannibalize old consoles for their controller ports – even broken ones.

    As for the shaders, yeah, I was being too ambitious. I have to use hdmi though, as I’m wanting to put this sdcard image online once it’s finished and I want it to be useable out of the box. Plus, it’s intended as a home console to connect to the main living room tv and I think the family would object to me adding a huge great CRT next to the nice slim hdtv 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar