Retroarch: Shader cycling next/previous does not work

Created on 28 Apr 2017  路  11Comments  路  Source: libretro/RetroArch

Description

Shader cycling does not work with standard default config.

Expected behavior

In game, keys m/n on keyboard should cycle the shaders.

Actual behavior

It seems that only shaders in the default .config/retroarch/shaders dir are used, but no files are ever written into this dir. Instead, they are put in sub-directories that never get scanned.

Steps to reproduce the bug

  1. Download shaders
  2. Start game
  3. Press m/n to cycle through all shaders

Bisect Results

New install of latest stable in Ubuntu x86_64.

Version/Commit

  • RetroArch: c045732

Environment information

  • OS: Linux


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

input hotkeys

Most helpful comment

This surprised me as well. I intuitively expected the next/previous feature to operate in the context of the loaded shader, so if I manually load a preset, I could cycle the presets in that directory (or subdirectories).

The build already knows what shaders are supported, would it be too much work to do a recursive file scan, include only supported extensions, and cycle that list?

All 11 comments

Yep, it's a problem alright. We've discussed putting some glslp presets in the base directory, since they're compatible with Cg and GLSL contexts, but they'll still cause a black screen if someone is using vulkan...

Is there a script I can run that will correctly import shaders from CG or GLSL dirs. (btw what is CG, GLSL? I'm running with GL driver, so I should be using the GLSL shaders ???)

Cg and GLSL are shader languages. GLSL is the official shader language for GL while Cg is a language designed by Nvidia to work with both GL and DirectX. We invested pretty heavily in Cg because of its cross-platform/cross-gfx-API capabilities, but Nvidia officially deprecated it a while back, so its days are numbered.

If you're using the GL driver, Cg and GLSL should both work fine. I think beetle-psx-hw and/or mupen64plus-libretro might have some issues with Cg shaders (sometimes?), so GLSL is slightly more compatible while Cg has a couple more advanced shaders (e.g., crt-royale) that GLSL is lacking.

And no, there's no programmatic way to create top-level playlists for all of the shaders. If you're just wanting to see what they all look like, check out https://github.com/libretro/shader-previews

@cmcginty - found myself in the same boat tonight - tackling retroarch for the first time. Came across the same problem. Have knocked something together to aid copying shader files from the three different directories to the shaders root folder. It's very rough and ready but does the job. You can find it here:

https://sites.google.com/view/magoarcade/software/alphadev

Couldn't you do a "save shader preset as" into the top directory and then switch between those?

but they'll still cause a black screen if someone is using vulkan...

What about cycling on cgp if the user has cg, cycling on slangp if the user has vulkan enabled, and if the user has none of them, we cycle over glslp files only?

@Kivutar
Yeah, making the shader-cycle action aware of the context and only cycle through the current context's shaders would be a good improvement, I think.

The idea is to use the save shader preset as entry to save your preferred presets to that folder.

I could make it follow a manually loaded shader I guess but by default I guess it will use the top level dir

This surprised me as well. I intuitively expected the next/previous feature to operate in the context of the loaded shader, so if I manually load a preset, I could cycle the presets in that directory (or subdirectories).

The build already knows what shaders are supported, would it be too much work to do a recursive file scan, include only supported extensions, and cycle that list?

HI GUYS, I FOUND A SOLUTION THAT WORKS...

  1. Edit the retroarch.cfg file and change the video_shared_context = "false" to "true" and save it
  2. Create and save a shader presets in the retroarch program.
  3. READY press M or N to change the predefined shader presets

HAVE FUN

Was this page helpful?
0 / 5 - 0 ratings