cozygalvinism / reshader Goto Github PK
View Code? Open in Web Editor NEWA tool and library for installing ReShade on Linux!
License: GNU Lesser General Public License v3.0
A tool and library for installing ReShade on Linux!
License: GNU Lesser General Public License v3.0
We may not want to by default allow both reshade-shaders
and gshade-shaders
. If someone ends up with both directories in their area for whatever reason shaders will double load which is bad. Same story for textures.
Originally posted by @ultimatespirit in #3 (comment)
Hey,
Great work on this and thanks for making it. Though I have not myself used it as I swapped over manually unzipping the exe and what not few days back, I did read through the code and liked it + I always appreciate people willing to make helper tools for Linux / share their knowledge.
With that in mind, wanted to bring up some small suggestions for the todo list, though I'm ignoring more code cleanup style things I'm sure you're already handling (like the repeated error handling logic areas that could probably be refactored etc.). Obviously feel free to ignore any or all of them, I've ordered them roughly from smallest to largest changes.
xdg-open
exists / fail if it doesn't exist outright in the presets install section. Perhaps print the url out to stdout if xdg-open
fails and then continue rather than aborting. Ref: Line 172 in 3e2e5be
dxgi.dll
and d3dcompiler_47.dll
after storing them in the data folder. Saves on re-downloading them all across multiple installs, not to mention deduplication between multiple installs. By the way, thank you for respecting the XDG directory specification / using libraries that respect it.readline
could be cool too, or similar modern equivalents if Rust has any, not too familiar with readline-type stuff for Rust.That's more or less all that comes to mind at the moment, thanks for reading.
Hey again, just wanted to let you know that it seems like at least some preset/shader authors in the community (and probably all of them as time goes forward) are gearing their new releases around the assumption that the user just straight installed ReShade 5.6 while checking all the "install shaders" options. I.e. there's an assumption that reshade-shaders
has everything in it that a normal ReShade 5.6 install would have (and only those to an extent).
As I've found, however, what GShade had is not necessarily the same as the above and so you may run into weird and exciting breakages from those differences.
So with that in mind, future-proofing wise it may be desirable to be able to only install the base reshade-shaders
as done by the ReShade installation process. From here: https://github.com/kevinlekiller/reshade-steam-proton/blob/main/reshade-linux.sh#L305
It seems like a full installation wherein you checked all the optional shaders has the following repos merged into one reshade-shaders/{Shaders,Textures}
, with some of the optional extras as sub-folders for the Shaders/
case.
https://github.com/CeeJayDK/SweetFX
https://github.com/martymcmodding/qUINT
https://github.com/BlueSkyDefender/AstrayFX
https://github.com/prod80/prod80-ReShade-Repository
https://github.com/crosire/reshade-shaders
I got a friend on Windows to do a fresh install to confirm the directory structure and at least by default it seems that reshade-shaders/Shaders
does the following:
Shaders
in their respective git repos are copied directly to reshade-shaders/Shaders
for the following:
Shaders
in their respective git repos are copied into a subdirectory within reshade-shaders/Shaders
for the following:
reshade-shaders/Shaders/qUINT/
reshade-shaders/Shaders/AstrayFX
(including another subdirect OneShot
as in the repo)reshade-shaders/Shaders/PD80/
The Textures
directory remains flat, just a direct copy of all Textures/
folders from the above five repos.
If you wanted to be really fancy, as they're all git repositories, you could optionally depend upon git
and git clone <url>
all five of those repos (perhaps as shallow copies on first install), symlink them into the merged structure (as the kevinlekiller script does), and then use that structure accordingly. That way update operations can be as simple as git pull
on all of them (or be even more fancy and setup the download area as a git repo that those 5 are subrepos of and then use a submodule recursive update to do all of them, that seems like overkill though).
Alternatively just straight zip download as per usual of course.
As a plus to all this, all involved repositories don't have asinine unenforceable provisions against downloading them, and some of them are even open source, so this can be automated.
Oh also as an additional bonus, here's the full text of the default ReShade.ini
configuration file created for this type of installation (the subdirectories in reshade-shaders/Shaders
are included explicitly rather than by using a wildcard catch all)
[APP]
ForceDefaultRefreshRate=0
ForceFullscreen=0
ForceVsync=0
ForceWindowed=0
[GENERAL]
EffectSearchPaths=.\reshade-shaders\Shaders,.\reshade-shaders\Shaders\qUINT,.\reshade-shaders\Shaders\PD80,.\reshade-shaders\Shaders\AstrayFX
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=1000.0,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=1,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
TextureSearchPaths=.\reshade-shaders\Textures
[INPUT]
GamepadNavigation=1
KeyOverlay=36,0,0,0
(This is mainly copied from what I posted as a review on the original merge to handle issue #2, the analysis at the end has been expanded a bit)
Line 147 in 6ebffe6
We run into an ordering issue here between crosire/reshade-shaders
and CeeJayDK/SweetFX
, where if one repo had overlapping files that were not exactly the same then the order in which we add them matters. It stands to reason that it's likely for crosire/reshade-shaders
to be the base directory over which things get overwritten, if needed. Currently I believe the ordering of repos in SHADER_REPOSITORIES
makes it so SweetFX
would get overwritten.
And indeed, if you run the following (assuming all pulled repositories are in the CWD at start)....
$ cd SweetFX
$ shasum Shaders/* > ../SweetFX-Shaders-SHAsums.txt
$ cd ../reshade-shaders
$ shasum -qc ../SweetFX-Shaders-SHAsums.txt --ignore-missing
Shaders/FXAA.fx: FAILED
Shaders/Nostalgia.fx: FAILED
Shaders/SMAA.fx: FAILED
shasum: WARNING: 3 computed checksums did NOT match
So at time of writing three files in SweetFX
that are also in crosire/reshade-shaders
on the master
branch do not match.
I checked the SHAs versus a copy of reshade-shaders
from a fresh install on Windows that a friend provided me and SweetFX
shaders match perfectly, whereas crosire/reshade-shaders
did not match for 6 files (the 3 noted above that conflict between SweetFX and itself, as well as 3 additional files that are newer in the fresh install than what appears to be currently on master
in crosire/reshade-shaders
. These files appear to be from the slim
branch.).
For what it's worth, there is no overlap currently between SweetFX
and the slim
branch, and it seems none of the files on master
that are not in slim
are in the fresh install. So I think this may be a case of the infrastructure having changed since the time of the shell script my original suggestion was based off of. Indeed that script actually didn't even make the subdirectories currently seen, it just shoved everything into one flat Shaders
directory, though it did not overwrite anything.
Tl;dr it seems we need to use the slim
branch to conform most closely to what a pristine installation does, and regardless we want crosire/reshade-shaders
to go first / get overwritten when a conflict emerges. If we did want to ship the extra shaders master
has over slim
it would require some finangling since slim
is definitely newer than master
is currently.
Also having said all that... it seems this file is our canonical information sheet on what to install and how: https://github.com/crosire/reshade-shaders/blob/list/EffectPackages.ini
From the list
branch of crosire/reshade-shaders
.
So... that's an oops on my part sorry. Parsing that file and just following it is likely to be the best path forward. This also explains why I had heard things like "installing all shaders is a bad idea because conflicts with these presets". Turns out there are more options the installer lists. Choosing to install any or all of them probably should be emulated directly with a select dialogue the user goes through (or specifies at the CLI, though that gets increasingly cumbersome). The default install appears to be solely crosire/reshade-shaders
(slim branch) and SweetFX
(as marked by the "Enabled" flag).
not everyone uses bloatware as their operating system
When selecting "Install/Update ReShade shaders" I get the following error message:
> Select an option Install/Update ReShade shaders
Cloning shader repositories...
Error: Custom(Git(Error { code: -3, klass: 4, message: "reference 'refs/remotes/origin/master' not found" }))
I get the same result with reshader install-reshade-shaders
.
I've noticed the project has gone on hiatus due to lack of free time. I was wondering if you would be willing to add me as a maintainer so I can help keep the project running and up-to-date.
I have already read through the code base and have contributed code for a gshade shader path fix in the past. I am also quite familiar with Rust.
The current way errors are handled is flawed and makes the errors not very readable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.