GeDoSaTo 0.21 – multiple PSHashes, better AO targeting, multi-pass postprocessing etc.

Since the last time I wrote about GeDoSaTo, there have been quite a few changes/improvements. The full changelist is on Github (basically everything under the beta 20 and beta 21 headings), but I feel like some things need further explanation.

Multiple PSHashes can now be specified

This means that it’s easier to get perfect coverage of post-processing injection and hudless screenshots in more games, more situations , and with a larger variety of settings, with a single uniform profile.

Introducing AOHash for the generic depth plugin

It works like the PSHash system, but when the hash is encountered AO is applied (with the GenericDepth plugin). This means you can inject AO before the game renders things like volumetric fog, particles or light overlays:

The way both of these features work is illustrated by the new default profile for Dragon’s Dogma:

hashesI also implemented a depth-based fadeout for AO, this helps work around issues with fog which are not resolved by the new hash targeting ability. You can currently configure it directly in the SAO shader. (Which you can of course customize for each game profile like any shader)

Combining AO hash targeting and the fade-out, it’s possible to get artifact-free AO in e.g. Dragon’s Dogma, which was my main test case.

Multi-pass Postprocessing

Rather than pushing every effect into a single shader (which simply doesn’t even work for some combinations) you can now specify an additional postprocessing pass with e.g. addProcessingPass deband.fx in any settings file. Currently, only the deband shader has been separated out, and you can look at its source here. The system is still not as flexible as I’d like it to be (in order to be able to implement more complex effects without changing GeDoSaTo), but it’s a pretty significant step forward.

Other Stuff

You can get the latest version by updating from within GeDoSaTo or with the installer provided here. As always, you can donate to support continuing GeDoSaTo development here.

And yes, I know that this is not the DX11 support that everyone is asking for all the time. Sadly, that’s on a different level of engineering time requirements.

GeDoSaTo Injection, Once Again

Based on various bug reports and testing, I’ve identified 3 major causes which have contributed to the issues with the new injection system that some users of GeDoSaTo have experienced. Two of these are fixed now, and the other one is a system setting which is reported by GeDoSaToTool for you to fix.

The problems were:

  • Whitelist-based injection was case aware, while previously it was case-insensitive. Since case is based on the launch name of the .exe, this is not always easy to identify, and therefore I made it case-insensitive again.
  • Installing GeDoSaTo to paths with spaces in them would prevent it from working. This was fixed by generating the short path name rather than using the full path for injection.
  • On Windows 8 and 10, if the UEFI secure boot feature is enabled, it prevents the injection mechanism used by GeDoSaTo from working. I’ve added a step to the installation guide about this and also check for and report it as an error in the tool.

Luckily, all of these so far could be fixed without jeopardizing the stability and compatibility improvements of the new injection system.

I’ve also fixed some small issues in the updater/installer, and it now keeps a backup of the replaced executables/dlls until the next update (even though all of them are always available on github).

You can get the latest version by updating from within GeDoSaTo or with the installer provided here. And, as always, you can donate to support continuing GeDoSaTo development here.

Zestiria character shadow improvements, GeDoSaTo injection compatibility

I just pushed a new game-specific plugin for Tales of Zestiria which increases character shadow resolution/detail. It’s just a minor change, but it was annoying me that the in-game shadow setting increased environmental shadow resolution, but only blurred character shadows more. It just doesn’t make sense that shadows (ostensibly from the same light source) would look completely different if they were cast from characters rather than the environment.

It turned out that the character shadows were being rendered at only 64×64 (!), with 128×128 for Sorey, so it’s hardly surprising that they lacked detail. The new game-specific plugin rectifies that, and it’s designed to show similar detail to the game’s “high” environment shadows. Compare:

Original character shadowsModded character shadowsNote how the character shadows are just amorphous blobs in the original image. This would be fine I guess as a design choice if it was uniform, but the environment shadows right next to them are much more sharp and detailed! In the modded version, I tried to unify their appearance so that they look like they belong in the same scene.

GeDoSaTo New Injection Compatibility

By now, I’ve got a lot of feedback on the new injection method. What I expected was for quite a few games to stop working for everyone, while others would still work perfectly. That didn’t really happen to any extent.

The good news is that the new (much safer) injection method seems to have fixed injection issues with the previous version for a large number of people. Perhaps even more importantly, it appears to have completely eliminated both updating issues and crashes in unrelated applications for everyone, which was very important to me. I really don’t want people to download GeDoSaTo and experience random crashes, which was the case for some previous versions.

The bad news is that there are people for whom previous versions worked which report that the new version doesn’t work at all. Worse yet, there’s no pattern which I could discern so far as to who it works for and who it doesn’t work for.

Therefore, I ask both people for whom the new version works and those for whom it doesn’t to report here. I hope we can track down some common reason for the behavior.

GeDoSaTo 0.19 “Chaos Flare” – Completely revamped injection

I just released a new version of GeDoSaTo, 0.19 “Chaos Flare”. This release completely changes the injection method. The goal is to be:

  • More consistent. There is now only one method of injection for everything.
  • More compatible. The first injected dll is extremely small, adheres to the Windows standards for DllMain and has no dependencies on any libraries.
  • Safer. The inital dll is written in a very defensive fashion, always loads correctly, and always unloads itself from processes.

This required switching to a 2-stage injection process. Instead of directly injecting the full GeDoSaTo dll, dragging in all its dependencies, and then checking whether it should unload itself, there is now a separate, minimal “shim” dll which has the sole task of injecting the full GeDoSaTo only into whitelisted processes. The entire injection workflow now looks like this:

injectionIn some more detail, the advantages of this are primarily that the “shim” dll, gedoshim.dll, has no dependencies at all except for kernel32.dll, which can be assumed to be present. Furthermore, it doesn’t perform any extensive processing in its DllMain entry point, but rather defers it to a thread it launches. Finally, it always unloads itself, regardless of what happens. All of these properties together should make it almost impossible for it to crash arbitrary processes, even if something does go wrong.

All of this required somewhat major changes, over the course of which I also got rid of some features which shouldn’t really have been used anyways. There are also some drawbacks to this, the extent of which will only be apparent after more people test this latest release:

  • The blacklist feature is gone completely. Every executable you want to run with GeDoSaTo now needs to be whitelisted. It’s safer, reduces complexity, and is really not much work at all.
  • Due to purging the old dual-injection method, the “delayDetouring” option no longer exists. The hope is that games which required it will now simply work anyway, due to the more solid implementation.
  • As you can already see to some extent in the illustration, it’s possible that the new injection mechanism leads to hooks being initialized only after a game has already performed some processing. This has not occurred in my limited testing so far, but it could nevertheless be an issue.

I’ve also used this opportunity to clean up the interface a bit, particularly in Windows 10, and update the readme for the first time in a while.

I’m looking forward to some user feedback on this release. I knew that these changes have been necessary for a while, but I dragged it out due to the high degree of annoyance caused by the shim dll implementation. String processing in C++ isn’t that great in the first place, but without any libraries (including the standard library!) it’s just terrible.

You can get the latest version and test this injection method with the installer provided here. And, as always, you can donate to support GeDoSaTo development (including annoying injection shims!) here.

Note that the main GeDoSaTo dll still requires the latest VC libraries.

Update:
From feedback on Github, it sounds like this update accomplished what it was supposed to. Whew, I’d have hated for all this work to be in vain.

Tales of Zestiria article, and the state of GeDoSaTo stability/compatibility

Starting with the good news, I’ve completed another port analysis for PC Gamer, this time around for the recent Steam release of Tales of Zestiria. In short, it’s about as good as a 30-fps-locked port can be, and I was particularly impressed by its keyboard and mouse input support.

To mark the occasion I’ve also pushed a profile for the game to the GeDoSaTo repository, which allows correct mouse mapping while downsampling and includes a PSHash for HuD toggling and HuD-less post-processing/screenshots.

Talking about GeDoSaTo, I’m well aware that the most recent version introduced serious compatibility/injection issues for some, and I’ve already invested some time in trying to pin those down. At this point, I’m still not sure what’s going on, but my best guess is that it’s related not to any code change but to switching to the latest version of Visual Studio and its runtime library. In general, getting the redistributable for Visual Studio 15 might help.

Overall, I fear like the only solid solution to this issue is creating a separate “shim” .dll for GeDoSaTo which doesn’t link any CRT library, injecting only that in all processes, and making the decision whether to actually load GeDoSaTo in that separate dll. This is a heavier undertaking, and I plan to give it a go this weekend.

If anyone has any ideas (well, viable ideas, not pure speculation) about other potential causes for these recent issues I’d be happy to hear it.