Shaders outside of the built-in ones not working?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
Taiyaki
Posts: 24
Joined: Mon Jun 01, 2020 5:11 am

Shaders outside of the built-in ones not working?

Post by Taiyaki »

First want to thank the team for the incredible progress over the past few years. All the issues I had with previous versions have all been ironed out, and the inclusion of shaders is the greatest thing!

I do have an issue however, and that is to get ScummVM to read shaders outside of the packaged ones. I have tried everything including putting putting them in various locations where ScummVM folders are, as well as on the desktop, C:, and other places, and in all instances ScummVM rejects them with an error message. Eventually I even tried some shaders that were taken from the ScummVM shader location and could not get them to work either (the same ones that otherwise work when selected as part of the built in shaders). I'm on Windows 10 and using the latest version: 2.8.1.

Are manual shaders disabled on the latest build?

Any help or advice would be greatly appreciated.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Shaders outside of the built-in ones not working?

Post by Praetorian »

Taiyaki wrote: Thu Apr 11, 2024 8:16 am First want to thank the team for the incredible progress over the past few years. All the issues I had with previous versions have all been ironed out, and the inclusion of shaders is the greatest thing!

I do have an issue however, and that is to get ScummVM to read shaders outside of the packaged ones. I have tried everything including putting putting them in various locations where ScummVM folders are, as well as on the desktop, C:, and other places, and in all instances ScummVM rejects them with an error message. Eventually I even tried some shaders that were taken from the ScummVM shader location and could not get them to work either (the same ones that otherwise work when selected as part of the built in shaders). I'm on Windows 10 and using the latest version: 2.8.1.

Are manual shaders disabled on the latest build?

Any help or advice would be greatly appreciated.
Can you see what the actual error is on the ScummVM status window (running ScummVM from command line) or the ScummVM log file?

This could be due to a missing dependency for the shader you're trying to use.

For example, if I just copy the "film" shader folder out of the ScummVM shader pack and point ScummVM to use the "technicolor.glslp" file within that folder, I will get this error:

Code: Select all

[2024-04-11 15:22:33] WARNING: LibRetroPipeline::loadViaImageDecoder: Invalid file path 'D:/Games/ScummVMIcons/extShader/reshade/shaders/LUT/cmyk-16.png'!
[2024-04-11 15:22:33] WARNING: LibRetroPipeline::loadTexture: Loader for 'png' could not load file 'D:/Games/ScummVMIcons/extShader/reshade/shaders/LUT/cmyk-16.png'!
[2024-04-11 15:22:33] WARNING: Failed to load shader D:\Games\ScummVMIcons\extShader\film\technicolor.glslp!
This means this shader needs (at least) those files mentioned, and tells you where it expects to find them. You can alter the path for the files if you edit the glsp file for the selected shader (here it would be the "technicolor.glslp" file) with a text editor, save and retry.
Taiyaki
Posts: 24
Joined: Mon Jun 01, 2020 5:11 am

Re: Shaders outside of the built-in ones not working?

Post by Taiyaki »

Thank you so much for the reply.

So for example here's the latest log after trying a couple out again:

[2024-04-11 12:15:42] WARNING: LibRetroPipeline::loadPasses: Invalid file path 'C:/Users/Norikiyo/AppData/Roaming/ScummVM/Icons/shaders/crt-lottes.glsl'!
[2024-04-11 12:15:42] WARNING: Failed to load shader C:\Users\Norikiyo\AppData\Roaming\ScummVM\Icons\crt-lottes.glslp!
[2024-04-11 12:21:59] WARNING: LibRetroPipeline::loadViaImageDecoder: Invalid file path 'C:/Users/Norikiyo/AppData/Roaming/ScummVM/Icons/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png'!
[2024-04-11 12:21:59] WARNING: LibRetroPipeline::loadTexture: Loader for 'png' could not load file 'C:/Users/Norikiyo/AppData/Roaming/ScummVM/Icons/shaders/crt-royale/TileableLinearApertureGrille15Wide8And5d5SpacingResizeTo64.png'!
[2024-04-11 12:21:59] WARNING: Failed to load shader C:\Users\Norikiyo\AppData\Roaming\ScummVM\Icons\crt-royale.glslp!
[2024-04-11 12:22:43] --- Log closed successfully.


These are shaders I copied out of the zipped file from ScummVM, and they work fine when selected as part of the packaged shaders.

So if I understand correctly when new files are moved into these folders (or anywhere), I need to alter the xxxx.glsl or xxxx.glslp file in a text editor to rearrange the paths?
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Shaders outside of the built-in ones not working?

Post by Praetorian »

From the error message it seems that the crt-lottes shader depends on files from the "crt-royale" folder, so you should extract that folder too and put it on the same path "level" as the "crt-lottes" shader (and *not* inside that folder). Then try again.
Taiyaki
Posts: 24
Joined: Mon Jun 01, 2020 5:11 am

Re: Shaders outside of the built-in ones not working?

Post by Taiyaki »

My bad I didn’t explain properly. Actually that error log has two separate errors in succession. I first tried loading lottes and then crt royale and neither worked. Both were pulled out from the packaged shaders in ScummVM.

Nothing I do seems to work. I’d love to hear if anyone else on Windows 10 is able to get shaders of any kind running other than the packaged ones.
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Shaders outside of the built-in ones not working?

Post by Praetorian »

Right. I did read the error messages quickly and didn't spot that it's from attempting to load two different shaders.

However the error do indicate that ScummVM could not locate needed files for the shaders, and those files seem to be expected to reside within the respective folders of the shaders. Did you not extract the entire folders for those shaders?

At this point, it would help if you showed exactly what you've extracted and trying to load from ScummVM.

Eg. if it's just the glsp file for the shader, then at the very least you need the entire folder for that shader (keep the folders structure as is, and the glsp should remain inside it).
Taiyaki
Posts: 24
Joined: Mon Jun 01, 2020 5:11 am

Re: Shaders outside of the built-in ones not working?

Post by Taiyaki »

Thank you for that advice. So I tried loading built in shaders from within their original location:

C:\Users\Norikiyo\AppData\Roaming\ScummVM\Icons\shaders-20230108

And oddly enough some work, and some don't (the ones that don't do work when loading up through the packaged ones, but not when choosing "Pick file instead"). Some work both ways such as CRT-Royale. The strange thing is, if I move the entire folder and still keep everything nested together then those that previously worked (such as the CRT-Royale.glslp) will no longer work. So I guess somewhere paths are dictated?

Here are the shaders (the VGA.glsl group) I'm trying to get working with ScummVM. They're the packaged shaders that came with the latest DOSBox Staging (v0.81.0) releaased two months ago. It's their new default standard sets that allow for double scanline VGA like shaders. I didn't have any particular expectations when I first tried it out, and I came out completely blown away. It's the most convincing emulation of VGA monitors that I've seen, and really brings back memories of what playing Adventure games on 90's monitors felt like. So was hoping to get these running in ScummVM.

https://mega.nz/file/GSwWXLpD#Q4bxSbK4n ... PXtgTsPiKk

I unzip the entire folder as is with all files included, and the shaders still won't work in ScumMVM.

I tried going through the data of several shaders in a text editor and don't see anything related to paths, but either way ScummVM won't load them.

It doesn't have to be those, would have been happy with simply changing the settings in another capable shader such as crt-lottes or crt-easymode to incorporate VGA double scanlines, but since I can't get those to work when going the "Pick file" route I guess that isn't an option. The built in VGA shader is alright but not as realistic or as convincing as what other shaders can do.

Here's what the aforementioned DOSBox Stating VGA.glsl shader in action:

https://dosbox-staging.github.io/static ... mander.jpg
User avatar
Praetorian
ScummVM Developer
Posts: 797
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Shaders outside of the built-in ones not working?

Post by Praetorian »

Taiyaki wrote: Fri Apr 12, 2024 3:15 am And oddly enough some work, and some don't (the ones that don't do work when loading up through the packaged ones, but not when choosing "Pick file instead"). Some work both ways such as CRT-Royale. The strange thing is, if I move the entire folder and still keep everything nested together then those that previously worked (such as the CRT-Royale.glslp) will no longer work.
The errors are specific and differ for each case. You're not going to be able to fix them unless you know exactly what the error is for each case of attempting to pick a shader.
So I guess somewhere paths are dictated?
Like written above, the paths are within the text (typically .glslp) file that ScummVM expects you to select when choosing "Pick a File...".

I am able to load the crt-royale shader by extracting the "crt" and "blur" folders from the ScummVM shaders pack and putting both within a folder anywhere on my PC. I didn't know in advance that "crt-royale" would depend on and require files from the blur folder --although I could have, if I read through the entire crt-royale.glsp in advance. But I did read the errors ScummVM threw when trying to load the "crt-royale.glslp" file via "Pick a File...", and then provided the additional files it said were missing.
Here are the shaders (the VGA.glsl group) I'm trying to get working with ScummVM. They're the packaged shaders that came with the latest DOSBox Staging (v0.81.0) releaased two months ago. It's their new default standard sets that allow for double scanline VGA like shaders. I didn't have any particular expectations when I first tried it out, and I came out completely blown away. It's the most convincing emulation of VGA monitors that I've seen, and really brings back memories of what playing Adventure games on 90's monitors felt like. So was hoping to get these running in ScummVM.
These all seem to be glsl files in a format that ScummVM does not support at all as of yet.
If you compare the text contents of these files, with say "crt-royale.glslp" you'd see that they are very differently formatted.

The specific and different error when trying to load a glsl file directly is eg.

Code: Select all

WARNING: LibRetro Preset Parsing: Error while parsing file 'C:/games/extShaders/glshaders/crt/vga-1080p.glsl': Could not find '='  in line '/*'!"
The comments in the glsl files from the Dosbox staging pack do mention that eg. "this file ported from Libretro's GLSL shader crt-hyllian.glslp to DOSBox-compatible format by Tyrells", which does confirm that it's using a different format, supported by DOSBox.

I don't know as of yet if DOSBox Staging offers any shader files at all in that pack that ScummVM would support, but my guess would be it does not.
Taiyaki
Posts: 24
Joined: Mon Jun 01, 2020 5:11 am

Re: Shaders outside of the built-in ones not working?

Post by Taiyaki »

Thank you so much for that breakdown! That was very informative and I feel I have a better understanding of the issues I've encountered. I really appreciate you having taken the time.

So at the moment it sounds like the best odds for achieving the result I'm after is to figure out what dependents the other shaders that can be modified to provide VGA like double scanlines have and get a combination running that gives decent results.

DOSBox Staging integrated a "crt-auto" setting which selects the most appropriate shader dynamically based on the resolution used and the content displayed. Content is forced to stay at integer scaling so that the shader can function optimally. This can result in some light black bars all around the picture depending on the content and resolution. The auto setting can be replaced (and therefor disabled) with specific shaders in the config file. It's a pretty impressive solution that probably helps out users who otherwise don't understand why the shaders look off on their displays with games of different resolutions. I don't know if this is something considered for future ScummVM updates (or how complex the integration of such a feature might be), but I think would make for a nice addition, if feasible that is.
Post Reply