Close

Results 1 to 7 of 7
  1. #1

    Idea for a script to compile shaders for all games in a folder

    Hello.

    If anybody is up to the task and sees the value, it would be useful to have a tool that would automatically launch Cemu long enough to compile all shaders for a game, then move on to the next game in a directory until all shaders are compiled. This way, after you update Cemu, you can leave this running overnight so that next time you launch any game you won't have to wait for the shaders to do the first compilation, which can take a long time.

    It would be even better if this feature were integrated into Cemu itself ("pre-compile all shaders" or something like that), but an external script would do the trick.

  2. #2
    Super-Moderator epigramx's Avatar
    Join Date
    13.09.2017
    Posts
    373
    Shaders don't compile themselves regardless, they are compiled when the games need them. To put it simply, if you have already used the shaders needed for the current scene, the caching is already complete for that scene and no more is needed. You will need to move to another area of a game or use other abilities to compile more shaders.

    Cemu could in theory pre-scan for all shaders but when I asked Exzap for it he said while it is theoretically possible, some games shaders depend on the current state (what happens at a game's data at the moment of compilation) so that wouldn't be applicable properly.

    It's very doubtful an "external script" would do it without the devs' support, unless it's done at a very low level of Cemu.exe hacking.

    PS. A game might use additional shaders if left overnight if it employs additional effects automatically (e.g. BotW's time of the day and blood moon effects) but those are usually a small part of what is there.
    Last edited by epigramx; 08.11.2017 at 03:28.

  3. #3
    Hi, epigramx.

    Sorry, I should have been more specific. I'm referring to the shareable cache that can be downloaded from other users. On a game like MK8 with over 11,000 shaders available for sharing, the first time it is compiled it takes over a minute. Once it is compiled the first time, it loads in less than 10 seconds. This has to be done after updating Cemu to a new version or updating the GPU drivers. If a script could simply launch Cemu and let that initial compilation take place automatically for each game, then we don't have to wait that much when playing game after updates.

  4. #4
    Super-Moderator epigramx's Avatar
    Join Date
    13.09.2017
    Posts
    373
    Sure though don't expect much support from the devs since sharing caches is considered piracy in most jurisdictions because they contain binary shaders for the Wii U GPU.

  5. #5
    Quote Originally Posted by epigramx View Post
    Sure though don't expect much support from the devs since sharing caches is considered piracy in most jurisdictions because they contain binary shaders for the Wii U GPU.
    OK, I had not idea sharing the transferable cache was a touchy subject, since there are even instructions on how to do this and links to cache downloads in the wiki. Nonetheless, I'll drop the topic if it has the smallest possibility of causing any trouble.

  6. #6
    Super-Moderator epigramx's Avatar
    Join Date
    13.09.2017
    Posts
    373
    Quote Originally Posted by TheManuel View Post
    OK, I had not idea sharing the transferable cache was a touchy subject, since there are even instructions on how to do this and links to cache downloads in the wiki. Nonetheless, I'll drop the topic if it has the smallest possibility of causing any trouble.
    It's not always piracy since you may be sharing them between your own hardware, relatives or in countries where laws are lax. I just said that since Cemu devs operate with popular norms relating to anonymous internet users, they won't easily create tools that depend on shared caches but you never know!

  7. #7
    Understood. Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •