Git Product home page Git Product logo

Comments (5)

cozyGalvinism avatar cozyGalvinism commented on July 2, 2024

Oh wow, thank you for bringing all of this together, this really makes my work a lot easier. I will probably get around to adding ReShade shaders either later today or some time during next week c: And like last issue, I agree with all of your points. We will most likely go down the same route the installer script uses:

  1. Clone the git repository
  2. Merge shaders and textures for updating
  3. When installing ReShade for a game, we can check if an ReShade.ini exists, if it doesn't we create one.

I wanted to do the INI part from the start, but I didn't have a good grasp on what a default INI looked like.

For git, I will probably end up using git2, since those are bindings to libgit2. If someone doesn't have libgit2 installed on their PC, the build script for git2 will compile it for them, or so the page of the crate says.

Although one improvement which could be done for the INI is to add the IntermediateCachePath and set it to ./reshade-shaders/Intermediate to have a consistent cache across runs. I don't know where ReShade keeps the intermediate cache by default, but setting it gives us control to not care about the default, even if it should change. Though I am open for input on that idea.

from reshader.

ultimatespirit avatar ultimatespirit commented on July 2, 2024

It seems that the default it picks for IntermediateCachePath is: IntermediateCachePath=C:\users\steamuser\Temp\ReShade for a wine install. Which is basically just the windows equivalent of XDG_CACHE for the steamuser user.

So if we wanted to be in line with that we could use XDG_CACHE, or just keep it tossing into Temp (with the caveat that wine's Temp doesn't actually get deleted so you need to clean that area up now and then, I guess it could be setup to use the actual /tmp). However... I personally dislike wine tossing files outside of its own prefix by default, so I'm all for ignoring that and just setting IntermediateCachePath=.\reshade-shaders\Intermediate.

If modifying with sane defaults / being more in line with what gshade's defaults were, I'd also add that FileNaming=%Date%_%Time%_%PresetName% under the [SCREENSHOT] section should be in line with what gshade had by default I think. That or it was just my own personal default... Though I'd give my personal opinion that date + time + your preset in use is a much more sane default than ReShade's default which is just Application Name + Date + Time.

from reshader.

cozyGalvinism avatar cozyGalvinism commented on July 2, 2024

I wouldn't put them into /tmp as that folder is cleared after a reboot (TMPTIME is set to 0 by default). If the default cache path is inside the temp folder of the prefix, that's fair game for me too, but since we symlink the shaders anyways, there's no need to recompile the intermediates on every installed game (unless that cache depends on the prefix/Wine version again, which would make the temp folder the best option).

And your file naming default is good, ReShade's %AppName% %Date% %Time% is... maybe not the best option, unless you only really play and take screenshots with the same preset. Though I think we should include %AppName% into it, so may I propose FileNaming=%Date%_%Time%_%AppName%_%PresetName% (although that makes the file name even longer...)

I'd love if you could specify these variables in the save path, so ReShade would save screenshots into a folder called [your save path]/%AppName%/%PresetName%/[screenshot file name], maybe it'd be a good feature request for ReShade.

from reshader.

ultimatespirit avatar ultimatespirit commented on July 2, 2024

I mentioned /tmp solely because my understanding is on Windows \Temp functions the same as /tmp in that the files there are free game to be dumped after a reboot, though maybe I'm just misremembering and it's exactly what cache is in that it's okay to delete them, but won't be done automatically. It's a good point though about whether or not intermediate shaders are specific to the game, I'm not entirely sure as to the answer there though. I wouldn't expect them to be specific, and they certainly should not care about your wine version (maybe dxvk version, somehow, but that seems suspect) as they should be the compilations of the domain specific shader language .fx files for the chosen set of pre-processor definitions etc. Not really caring about game or runtime.

As for file name, if we're going to add the AppName may I propose having the AppName first then? I.e. %AppName%_%Date%_... I suspect if searching through a set of screenshots you will care first about which game it's from, and then the date, rather than strict chronological ordering across all game screenshots. That being said, personally, I'd end up just overwriting that default since I'd make a per-game ReShade.ini to be able to output the screenshots to an %AppName%/... directory....

Definitely agree that being able to specify at least the %AppName%, or perhaps an alias of it (introduce a new parameter that tells ReShade to override %AppName% to the alias, that way ffxiv_dx11 could be FFXIV or whatever is wanted), in the output path would be a great feature request... That being said I think we could make a.. somewhat cumbersome approximation by outright overriding the path in the Post-save command{, arguments} settings. Perhaps something like the following:

PostSaveCommand=optipng
PostSaveCommandArguments="-o 9 -preserve -quiet -out %TargetDir%\%AppName%\%TargetFileName %TargetPath%"

But I don't entirely trust the parameter quoting that the arguments variable will do, nor do I think it'll be as simple to just fork to a real Linux program from the wine run... I guess you could install into the directory a windows build and call that, or make a super simple program that just does the file system moves and nothing else. Honestly at that point probably easier to just setup a daemon watching the screenshot directory that asynchronously takes a %AppName%_%Date%... file, optimises it (if desired), and moves it to a proper %AppName%/... directory.

from reshader.

ultimatespirit avatar ultimatespirit commented on July 2, 2024

Unrelated to this issue directly, but since reshade has no issue tracker and I can't easily build it at the moment (not figuring out how to get the visual studio compilation working on Linux right now lol) to make a proper pull request, for your information... It seems that all that needs to be done is apply what's done here with expand_macro_string() to _screenshot_path before the screenshot_path construction step on line 4450 below. Basically same exact invocation too since we care about the same presets there.

Probably needs some change to an external facing documentation so that mouse over details you can use those macros like the way the other settings do currently, but getting the macro itself to work should be as simple as that. Would be a decently quick PR to make I guess, given being able to build ReShade easily in the first place haha.

EDIT: That being said looking at the code... screenshot_name may actually be allowed to be an outright path? It seems like it would get respected. May be worth trying FileNaming=%AppName%\%Date%_%Time%_%PresetName% with an appropriate _screenshot_path and just... see if it works.

from reshader.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.