Dunno - Shaders & Filters?

Hi there, i need to know if for retroarch filters & shaders are the same, because i read on some parts for use filters and where i can apply filters, i just find “shaders” files and none “filters” files.

i just want apply filters without shaders (like the emulators : bsnes, VisualBoyAdvance, etc . . .) just if is possible because on bsnes filters and shaders are diferents. but on RetroArch i don’t know if are the same or not.

They are different. Filters run on the CPU and are applied in settings > video > video filter. Shaders run on the GPU and can be much more elaborate. They’re applied in quick menu > shaders.

1 Like

Thanks for where i can download filters for retroarch? (well in a manually compile version, i can activated shaders, but none file of shaders i can use with cores)

I think they’re compiled at the same time. they’re part of libretro-common, IIRC

i don’t find any filter file for apply it.

Look, i open RetroArch -> Config -> Video

Inside i select Video Filter

When i select that option, RetroArch want a File for Apply the Filter (like of a shader), well i select the retroarch config folder because under GNU/Linux in there had the files for user

But don’t exist a folder called “filters” or something like that, i had explore all folders and sub-folders and don’t exist any file to apply filter inside retroarch.

And because of that things i ask if the shaders and filters and the same for retroarch because for me is strange in video filter not is just select one press left/right to cycle beetween the filters, just want file for apply it, like a shader and more strange for me its inside retroarch don’t exist any file for apply video filter (not shader).

Yes, you compile them when you compile RetroArch. They’re in RetroArch/gfx/video_filters/. They compile as dynamic libraries and you need them and a text file that has the *.filt file extension that works sort of like a shader preset to tell RetroArch which dynamic lib to load.

Thanks i am updating the source code of retroarch from git, well i hope i can compile the latest version with filters & ffmpeg support

Thank you very much i had downloaded the latest git source with the follow command

cd /media/Compartido/Liñux/cdf/git
git clone https://github.com/libretro/RetroArch.git
cd RetroArch
chmod a+o+x fetch-submodules.sh
./fetch-submodules.sh
su -c "mkdir -p /opt/videojuegos/retroarch_git ; chmod 777 -R /opt/videojuegos/retroarch_git" root
./configure --disable-systemd --enable-ffmpeg --prefix=/opt/videojuegos/retroarch_git ; export {C,CXX}FLAGS='-O2 -fPIC -march=native -mtune=native -pipe' ; export OPTFLAGS='-O2 -fPIC -march=native -mtune=native -pipe ; \
CFLAGS='-O2 -fPIC -march=native -mtune=native -pipe' ; \
CXXFLAGS='-O2 -fPIC -march=native -mtune=native -pipe' ; \
OPTFLAGS='-O2 -fPIC -march=native -mtune=native -pipe ; make ; su -c "make install ; ldconfig"

Well i notice i forgot the video filters

cd gfx/video_filters
./configure
make

i notice files with .so extension had been created.

Well for that i decide to make the follow sub-folder :

mkdir -p "$HOME/.config/retroarch/video/filters"

After i use a graphical file explorer to reach the video filters and the library files for copy them [Because this is not automatically with a custom prefix]

After i just paste on “~/.config/retroarch/video/filters”

Now i ran the latest retroarch i compile :smiley: and go to the configure menu -> video -> filter

i navegate between my files to ~/.config/retroarch/filters/

i select “video” sub-folder and set “Scanlines2x.filt”

Now i ran “Gryzor” (Family Computer Contra Version) and now its working

With fceumm core the follow filters works fine :

scanlines2x
scale2x
phosphor2x
normal2x
LQ2x
EPX
Darken
Blargg_NTSC_SNES_S-Video
Blargg_NTSC_SNES_RF
Blargg_NTSC_SNES_Composite

The anothers just show me an “GLX error”(s) on the terminal output, well i need make more test with another cores.

Thank you very much at least i can use filters and not shaders :smiley: (my pc can use filters perfectly but with shaders goes slowpoke)

1 Like

I still do not understand how to install shaders/filters and how to activate them. This seems to be too difficult for regular users, should be made more clear and easier.

Very few people should be using filters at all, so you can usually just pretend they don’t exist.

Shaders come with the program and/or can be fetched from the online updater. You apply them by loading a core+content and then go to quick menu > shaders > load shader preset and then pick the one you want.

The shaders can be downloaded from retroarch, in my particular case i need to download the source code of the video filters, compile them, and manually copy the library file with the another files need it to be applied.

To enable shaders you just need start a game, press F1, go to Shaders, Enable Shaders, Shaders Pass > 0 [Well i don’t know the text on english i use retroarch on spanish]

If you set 1 you notice in the inferior part of menu appears some like

Shader #0 You posicionate and press enter and set search compatible files [cg, slang, glsl, etc]

Shader Filter : Nearest or Lineal

Well for the Video Filters you can check the screenshot i had share before

and the another thing you can use for a “Video Effect” is the “Overlay” i use some overlays, and well can looks nice.

The problem is the “compile them”. Why aren’t they provided in compiled form? How to compile them on MacOS?

Ok, figured it out - simply MainMenu/Online Updater/Update GLSL Shaders. No compiling needed.

The “internal resolution” in the options menu after pressing F1 is not internal at all - if I rise the value, the window is in the set resolution. But I would like to have higher resolution for rendering - that’s why PPSSPP looks much better as I set render resolution to 6x. How to do that on RetroArch?

Right. Shaders are compiled at runtime. Filters have to be compiled ahead of time.

The stuff in quick menu > option are the core’s options. When you increase the internal res there, you’re increasing the rendering res of the core, which also increases the window size, which is a multiple of the core res (you can change the window scale in settings > video > scaling(?)).

If you use fullscreen, the image will be scaled up to fit the screen (or down, if the core’s internal res is larger than your screen) using either bilinear or nearest-neighbor scaling (again, determined by the “bilinear filtering ON/OFF” option in settings > video), or a shader algorithm if you have one loaded.

How to get the same result as in PPSSPP with higher render resolution like the 6x I set in PPSSPP?

fullscreen ON, internal res to whatever.

I do not want to use fullscreen. Why can’t this be set via windowed mode like in PPSSPP?

I found a method but when using it, RetroArch crashes.

I set the Windowed Mode/Windowed Scale from 3x to 1x and the Internal Resolution to 1920. This would do the trick - but RetroArch crashes as mentioned.

What you need compile ? i just open bash and use the follow commands

echo 'Clone repository'
git clone https://github.com/libretro/RetroArch retroarch 
echo 'Enter in the retroarch sub-directory'
cd retroarch
echo 'Update/Upgrade the main module'
git pull
echo 'Update/Upgrade all sub-modules'
./fetch-submodules.sh

echo -e 'Configure for 
1. No use systemd (i just use GNU/Linux distros without SystemD)
2. Enable FFMPEG for Record Gameplay Videos (with some cores this don't work just create a .bsv file instead the video file)
3. Set prefix in /usr (GNU/Linux common install path)
4. Enable Optimizations (i dont know if in Macacosx are usable / compatible)
5. And after set & configure all options, start to compile retroarch'

./configure \
--disable-systemd \
--enable-ffmpeg \
--prefix=/usr ; \
-mtune=native -pipe' ; \
export OPTFLAGS='-O2 -fPIC -march=native -mtune=native -pipe' ; \
make ; su -c "make install ; ldconfig" root
echo -e '
6. The Video Filters must compile manually
7. After compile video Filters must copy the .so & .filt files for use them to another location ease accesible for final user.'

cd gfx/video_filters
./configure
make
mkdir -p "$HOME/.config/retroarch/video/filters"
cp *.so "$HOME/.config/retroarch/video/filters/"
cp *.filt "$HOME/.config/retroarch/video/filters/"

Now just run retroarch and try :smiley: