Where Are The New Shaders Stored?

Ask for help with ScummVM problems

Moderator: ScummVM Team

EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Where Are The New Shaders Stored?

Post by EstelRandir »

For ScummVM 2.7.0, where are the new shaders stored? I cannot seem to locate them or set a path for them.
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Where Are The New Shaders Stored?

Post by Praetorian »

They are using the same path as the icons, so check your path under Global Options -> Paths -> Icon Path.

"Default" on Windows should be:

Code: Select all

 %AppData%\ScummVM\Icons
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Where Are The New Shaders Stored?

Post by EstelRandir »

Thanks. They will only appear there if you first choose update shaders.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: Where Are The New Shaders Stored?

Post by criezy »

The default set is distributed in the same place as the themes, fonts, and engine data files, which for example means it is embedded in the scummvm.exe on Windows, and included in the ScummVM.app bundle on macOS. So indeed only additional sets you can downloads from the Global Options will appear in the icon path set in the application.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: Where Are The New Shaders Stored?

Post by sev »

You may download all the shaders from this repo: https://github.com/scummvm/scummvm-shaders

And then just point ScummVM to individual shaders (*.glslp extension). With any modifications and whatnot.

Particularly, for the crt-consumer shader you may want to set parameters warpx and warpy to 0 and avoid curvature.


Eugene
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Where Are The New Shaders Stored?

Post by EstelRandir »

I downloaded the "base" directory from https://github.com/scummvm/scummvm-shaders. As a test I tried to point ScummVM to a shader file (the .glslp file in the first subdirctory - not the shaders folder in that same directory) in that folder using the pick a file option. That does not work for me. It gives the error "could not apply aspect ratio setting". I tried this with several shader files. So I simply created "shaders-Custom Set.dat" with my modified shader in it. That placed my custom shader in the list & it works fine.

Thank all of you for your help. And sev, thank you for picking up on my deleted question regarding removing the warp. It is most appreciated. It works like a charm. You should try running Discworld I with that shader. It is beautiful, especially without the warp!
EstelRandir
Posts: 55
Joined: Thu Mar 16, 2017 6:02 pm

Re: Where Are The New Shaders Stored?

Post by EstelRandir »

criezy wrote: Thu Mar 30, 2023 7:18 am The default set is distributed in the same place as the themes, fonts, and engine data files, which for example means it is embedded in the scummvm.exe on Windows, and included in the ScummVM.app bundle on macOS. So indeed only additional sets you can downloads from the Global Options will appear in the icon path set in the application.
That explains why several of the shaders I "updated" do not work or cause serious errors (probably not all tested for compatibility). I keep forgetting that the base sets are included in the .exe. By the end of the day, my brain is often on overload with my job, lol.
bozskaggs
Posts: 1
Joined: Sun Jun 18, 2023 4:39 am

Re: Where Are The New Shaders Stored?

Post by bozskaggs »

Trying to modify a shader and not really understanding how to make the .dat file and put my modified shader in it. I downloaded the shader pack from github and when i point scummvm to it using "pick file" and run a game it gives a invalid path error. Just wanting to remove the warp effects.
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Re: Where Are The New Shaders Stored?

Post by sev »

bozskaggs wrote: Mon Jun 19, 2023 9:48 pm Trying to modify a shader and not really understanding how to make the .dat file and put my modified shader in it
Rename .dat to .zip and extract. You do not need to put your modified shader in it. Point ScummVM to a standalone file.


Eugene
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: Where Are The New Shaders Stored?

Post by MusicallyInspired »

Where are the shaders stored? I can't seem to find the files. And the update feature seems to be broken. It detects 1 new pack at 23 MB but when I go to download it I get the error "ERROR -1: SessionRequestFile: unable to open file to download into".
Last edited by MusicallyInspired on Thu Jul 06, 2023 4:18 pm, edited 1 time in total.
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Where Are The New Shaders Stored?

Post by Praetorian »

Which platform are you testing on?

A minimal package of shader files is contained in the scummvm distribution package. The extra ones will be stored in the "icons" path, which may or may not be created by default depending on your configuration.

But you can set the path manually via Global options -> Paths
https://docs.scummvm.org/en/latest/settings/paths.html
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Re: Where Are The New Shaders Stored?

Post by MusicallyInspired »

I'm on Win10. So the included built-in shaders are inside the EXE and not stored as loose files?

There are no extra shaders in my Icons folder. It refuses to download. My ScummVM folder is on a different drive so it's not an ownership issue and launching as Admin doesn't work either.

Also, manually choosing custom .glslp files doesn't work (I downloaded the glsl-shaders master from its Git). It just says "the shader could not be changed" when I try to apply after selection. EDIT: Actually, a select few of the built-in shaders don't work either and it errors out. bilinear.glslp is one of them.
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Where Are The New Shaders Stored?

Post by Praetorian »

I can reproduce the issue with some internal and external shaders not working.

I think I've found a couple of potential culprits and I've forwarded my findings to the team. The issue that prevents some internal shaders from loading is not specific to Windows (eg. it happens on Android too) and should be easy to fix. The other issue (failing to load a shader file through the "Pick a file instead") seems specific to non-POSIX platforms (ie. Windows) and I am unable to find a good fix for it, and other developers who are more familiar with this code may come up with a fix quicker.

As of yet, I cannot reproduce the issue of being unable to download the online shaders file, though.
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Where Are The New Shaders Stored?

Post by Praetorian »

I've opened a PR with a possible fix for the issues with loading (some) shaders on (some) systems:
https://github.com/scummvm/scummvm/pull/5140

---
Also, this question (Where are the new shaders stored?) already has a thread of its own here:
viewtopic.php?t=16826

I think we can move these latest messages there, since the discussion belongs there and also to keep this thread on-topic.

I will do this later today (if no other moderator beats me to the "punch").
Edit: The move of the pertinent posts is now complete.
User avatar
Praetorian
ScummVM Developer
Posts: 882
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: Where Are The New Shaders Stored?

Post by Praetorian »

MusicallyInspired wrote: Thu Jul 06, 2023 3:42 pmAlso, manually choosing custom .glslp files doesn't work (I downloaded the glsl-shaders master from its Git). It just says "the shader could not be changed" when I try to apply after selection. EDIT: Actually, a select few of the built-in shaders don't work either and it errors out. bilinear.glslp is one of them.
Another PR with a cleaner more efficient fix for this issue was merged with the master branch a few hours ago.

The fix is now part of the new daily development builds (those that have suffix: 5a84a5fd -- the ones with suffix "0bde66b8" are older and won't have the fix). This addresses the path issues for loading of shader presets (with dependencies on other files) from the included or downloaded shaders files and from pointing to an external preset on the File System with the "Pick file instead..." feature. This covers issues on all backends, and on Windows in particular.

Also to answer the previous question, the starting "shaders.dat" file, with a minimal selection of shader presets, is included in the distributed exe for the Windows version of ScummVM.
Post Reply