GeDoSaTo Beta 7 Release – “Seishoujo Sacrifice”

The first release after open-sourcing the project! There haven’t been any source contributions yet, but at least one person gave me some pointers to issues which need investigation.

I’m very happy with this release, particularly since I managed to fix the alt-tabbing crash bug which has been in GeDoSaTo since day 1 (read more here). But there are lots of other improvements as well, see below.

Changelist:

  • General:
    • Fixed Alt-tab crash when downsampling in fullscreen mode (!)
    • Added IDirect3DSwapChain9 interception (fixes compatibility with some games, e.g. Dragon Age Origins)
    • Screenshot fallback to full-size if hudless not available
    • Fixed Z/stencil buffer format detection (fixes e.g. GTA4)
    • Improved handling of automatically generated z/stencil buffers (don’t duplicate, we don’t need an original-res depth buffer when downsampling)
  • Generic Plugin:
    • Store screenshots after AA/postprocessing, not before
    • Only use float BB if required (should improve AA/post performance on most games)
    • Added ability to specify a “marker” pixel shader in the configuration, in order to apply AA/postprocessing before HUD rendering and capture hudless screenshots
  • GeDoSaToTool:
    • Added ability to edit game profiles using the built-in editor (still need to be created externally)

I guess I will need to create a guide for the new pixel shader marker functionality in the generic plugin. Its goal is to allow everyone to enable postprocessing without affecting the UI and hudless screenshots for every game, simply by editing the config file, without coding a plugin or compiling GeDoSaTo. Currently, I’ve added a config file for Blackguards which uses this feature.

Download GeDoSaTo 0.7 “Seishoujo Sacrifice” here, and I always appreciate any donations made here.

If you find a shader hash and create a config file for a given game, please post it on github, I will then include it in future releases.

GeDoSaTo alt-tabbing crash fixed

I just fixed the alt-tabbing crash when downsampling.
This was the result of a bit more than 3 hours of heavy debugging today, after doing the same already (unsuccessfully) a few times previously over the week.

Basically, the issue has always been that my calls to device->Reset() returned a D3DERR_NOTAVAILABLE error code. According to the documentation that’s not even possible, but here we are.

My error when debugging this was assuming that similar issues as for “normal” programs could apply. So I spent most of my time trying to hunt down a resource/memory leak – the usual cause for failing calls to Reset(). I should have known that I am not someone who just leaks memory willy-nilly ;). By the way, Microsoft’s PIX works really well for memory leak debugging DirectX9 applications.

The actual cause was much more obscure, and directly related to what a rather insane piece of software GeDoSaTo is in the first place. Basically, while downsampling, GeDoSaTo manipulates the results of umpteen Windows API calls to give an application the illusion – as perfectly as possible – that it is running on a display featuring the downsampling resolution. As it turns out, when DirectX performs a Reset operation, it checks whether its resolution switching succeeded using one of these APIs. So, after many hours over weeks of debugging, the solution to the crash is simply to turn off all the relevant interception mechanisms while the Reset() call is happening.

Hallelujah.

GeDoSaTo source code online!

The source code for GeDoSaTo is now online at:
https://github.com/PeterTh/gedosato

It includes a (rather short) developer Readme. The code base is, in my opinion, in a much better state than DSfix and DPfix, though I wouldn’t call it “clean” still. But it shouldn’t be too hard to get into.

I hope everyone who has sent me technically detailed mails about potential improvements (and everyone else interested of course!) will contribute!

The best way of contributing is using the GitHub facilities. That is, fork the project, add your improvements, and gather and document them into a pull request. As I wrote in the readme, if you plan to add a major new feature, it would be very helpful if you could contact me before (e.g. by email with a suitable subject line) so that we can discuss the design and not duplicate any work.

Please use the comments for this blog post only to discuss development or issues with this source release!

GeDoSaTo Beta 6 Release – “Stranger Than Fiction”

I’m rather proud of this release. There have been major changes under the hood, and I’m getting ready to release the source (and hopefully get bugfixes, improvements and plugins from lots of contributors).

First things first, I’ve decided to call this release the first beta. Also, since version numbers are dreadfully boring I’m adopting a new scheme whereby each release version will also have a name, and that name will be the name of an album I was listening to while working on it. This time around it’s “Stranger Than Fiction” by Bad Religion.

Changelist:

  • General:
    • Large-scale internal rewrite introducing game-specific plugin system
    • Moved all Dark Souls 2 specific code to a Dark Souls 2 plugin
    • Added generic plugin which supports AA and postprocessing in games without a game-specific plugin
    • Added performance monitoring system (per-frame CPU and GPU timing)
    • Added per-game settings support
    • Various bugfixes
  • Dark Souls 2:
    • Added option for different types of SSAO blur (the softer and better performing one used pre-0.5, and a fixed version of the sharper one introduced in 0.5)
  • GeDoSaToTool:
    • Now start up activated by default
    • Added Text viewer/editor component for readme viewing and editing setting files (has various text highlighting and autocompletion features)
    • Fixed black/whitelist handling in some circumstances
    • Fixed tray icon persistence in case of errors

Here is a screenshot of the new GeDoSaToTool UI:

And here’s what the performance monitor looks like:


In the source screenshot for the image above you can see GeDoSaTo running with SMAA and postprocessing in Ys Origin.

Download GeDoSaTo 0.6 “Stranger Than Fiction” here, and as always you can donate here if you enjoy using it.

The next steps are writing some developer documentation and a ToDo list, and then getting the source up on GitHub.

GeDoSaTo DS2E Alpha 5 Release

This one focuses on adding and improving graphical features.

  • Added new HDR bloom & eye adaption effect. Some example screenshots: 1 2 3 4 5. It’s highly configurable in the effect file. Also, it’s not particularly performance intensive, since it does large-scale gaussian blooming on a rendertarget pyramid.
  • Improved the SSAO smoothing. It now takes relative depth into account, resulting in more detailed SSAO particularly on small features.
  • Added Asmodean’s postprocessing suite as an option. It’s softer and features cinematic tone-mapping, and gives quite a different result from the profile included previously (which is still the default). Performance is comparable over both options. Default Postprocessing / Asmodean Postprocessing. Of course, both options can be customized in detail.
  • I’m now distributing the release mode .dll of GeDoSaTo, which could result in a minor performance increase.

For the next version, I’ll focus on polish, adding some small requested features, and getting ready for a source release. In particular, I want to

  • Create a plug-in system for game-specific code.
  • Move all DS2 stuff to a DS2 plugin.
  • Add a “generic” plugin which allows postprocessing and SMAA/FXAA on all games supported by GeDoSaTo.

Download GeDoSaTo 0.5 here, and as always you can donate here if you like it.

Oh, and once again, please do read the README file before reporting issues.

GeDoSaTo Article (German)

PC Games Hardware published an article (in German) about GeDoSaTo.

What surprised me most about it (in addition to the article’s existence) is the difference they measured between performance with GeDoSaTo downsampling and “native” downsampling. I always expected that to be negligible, at least if you use bilinear downsampling, but I never really benchmarked it. I’ll try to see if I can reproduce their results, and what can be done about it.

In other news, I’m getting closer to the next release, which will primarily be about adding a new HDR bloom & eye adaption effect for Dark Souls 2. This image shows it in-game.

GeDoSaTo DS2 edition Alpha 4 Release

This is a rather big one, even if you are not using GeDoSaTo with Dark Souls 2.

General Improvements:

  • Add option to completely hide the mouse cursor
  • Add option to force borderless fullscreen windowed mode

That’s right, you can now downsample in Borderless Windowed Fullscreen mode! This was a tricky one to implement, I need to make the game think that it runs both in a different mode (fullscreen) and a different resolution than it actually does, both when it uses Windows APIs and when it uses DX to query any information. This feature might therefore still be a bit buggy. Incidentally, this is also a workaround for the crash-on-alt-tab issue when downsampling. However, it breaks the Steam overlay — but you can just alt-tab to Steam instead.

DS2 Improvements:

  • Fix AO issue on systems with non-4:3 resolution, also improve other effect quality for such resolutions
  • Improve AO shader depth calculation
  • Upgrade SMAA to the latest version (quality improvement)
  • Implement stencil masking for SMAA (performance improvement)
  • Include FXAA option (a few people were asking for this since they prefer it in combination with downsampling)

The SMAA performance improvement is rather significant. In one test scene, previously Ultra SMAA would move GPU usage from 70% to 86% on my system, now it’s only from 70% to 80%. In comparison, the same scene with Ultra FXAA takes 77%.

Finally, I updated the readme file to hopefully make the instructions more clear. I’ll repeat them here:

  1. Extract the contents of the zip to some permanent directory
  2. Adjust the settings in GeDoSaTo.ini and GeDoSaToKeys.ini as desired
  3. [optional] Add your game executable names to “whitelist.txt” in the “assets” folder (dark souls 2 is already included!)
  4. Run GeDoSaToTool.exe *as Administrator*
  5. Click “Activate” (You can also make a shortcut for “GeDoSaToTool.exe -a”)
  6. Select the downsampling resolution in-game if you want to use downsampling
  7. ENABLE IN-GAME ANTI-ALIASING in Dark Souls 2 if you want to use any effects (also, disable in-game AO if you use GeDoSaTo AO, and in-game DoF if you use GeDoSaTo DoF)

Here is the download. And as always, you can donate here to support GeDoSaTo development, both for DS2 and in general.

Update:
To reply to the VAC questions: Yes, GeDoSaTo could potentially get you banned in any online game which uses an anti-cheat system. Just like anything else which modifies the game output, such as SweetFX or SMAA injection. Or, if you take user agreements literally, even FRAPS or a Mumble overlay. If you are concerned about this, then do not use anything which at all modifies what a game is doing in multiplayer/online games.
Personally, I hope modern anti-cheat tools are smart enough to figure out whether something just improves rendering or actually modifies the game’s data (that is, real cheating), but I can make no guarantees of any kind.

GeDoSaTo Dark Souls 2 Edition 0.3 ALPHA Release

This release is entirely dedicated to fixing the issues of the previous ambient occlusion implementation interacting with fog and alpha blended effects such as when you rest at a bonfire or fog walls. It also updates the AO shader to a new version by Asmodean.

When I set out to do this I expected it to take about an hour – it ended up at around 5. I first tried to apply the ambient occlusion in the game’s shadow buffer, and got that to work, but sadly there isn’t any shadow buffer in some areas! So I had to throw that away and start from scratch. Now the AO is applied in the base (linear color) HDR pass before alpha effects are rendered. A few shader-level tweaks might still be necessary, but at least the basics are now solid.

Remaining known issues:

  • [GeDoSaTo] Crashes when alt-tabbing out of and back into the game.
    Cause: Unknown, probably a resource management issue.

By the way, sorry if I don’t reply at whatever channel you are trying to contact me through, or approve your post here, I’m getting a lot of messages.

Here is the download. And as always, you can donate here to support GeDoSaTo development.

UPDATE:
It seems like the VSSAO2.fx shader file included in this version causes severe performance issues for some. If you are affected, try replacing it with the file from version 0.2. I’ll revert it in the next release. The actual rendering fixes are independent of the shader file, so you will still benefit from upgrading to 0.3!

GeDoSaTo Dark Souls 2 Edition 0.2 ALPHA Release

Good news everyone!

Bug Fixes:

  • Fixed crashes when taking screenshots while not downsampling.
  • Fixed broken rendering after Steam popups.
  • Partially fixed SSAO issues (minor issues might remain, expect further improvement later).

New Features:

  • Added hudless screenshot key. If you want to play with the HuD but still take nice shots!
  • Added option for “basic” pseudo-Bokeh DoF effect. Not as nice as the true Bokeh DoF, but only ~1/5th the performance impact.
  • Improved SSAO performance outdoors.

Remaining known issues:

  • [GeDoSaTo] Crashes when alt-tabbing out of and back into the game.
    Cause: Unknown, probably a resource management issue.
    Note: This only occurs when downsampling, and only for some people.
  • [GeDoSaToTool] The tool complains that it cannot access the registry.
    Cause: Might be an access rights/permission issue. Try running as administrator.
  • [GeDoSaToTool] The tool complains that it can’t set the global hotkey.
    Cause: Unknown. But this doesn’t really matter, you just don’t get a hotkey.

By the way, sorry if I don’t reply at whatever channel you are trying to contact me through, I’m getting a lot of messages.

Here is the download. And you can always donate here to support GeDoSaTo development.

NOTE: the default settings in the ini included with this version are probably not what you want. In particular, change “presentInterval 2” to “presentInterval -1“.

GeDoSaTo DS2E 0.1 alpha FAQ & Known Issues

Since it’s impossible for me to keep up and individually answer the flood of feedback I’m receiving right now, I’ll try to summarize the currently known issues with the initial release here.

Known issues:

  • [GeDoSaTo] Crashes when taking a screenshot.
    Cause: You are not downsampling, and I made a silly programming mistake. Will be fixed in the next version
  • [GeDoSaTo] Crashes when alt-tabbing out of and back into the game.
    Cause: Unknown, probably a resource management issue.
    Note: This only occurs when downsampling, and only for some people.
  • [GeDoSaTo] Rendering breaks when the Steam overlay pops up.
    Cause: Unknown. Steam overlay rendering might put D3D in an unexpected state.
    Workaround: Disable the Steam overlay.
  • [GeDoSaToTool] The tool complains that it cannot access the registry.
    Cause: Might be an access rights/permission issue. Try running as administrator
  • [GeDoSaToTool] The tool complains that it can’t set the global hotkey.
    Cause: Unknown. But this doesn’t really matter, you just don’t get a hotkey.

FAQ:

  • None of the effects work! What am I doing wrong?
    Make sure to enable in-game anti-aliasing, and try pressing the “+” key on your numpad to get a status report.
  • Why is the Bokeh DoF effect disabled by default?
    I disabled that one because I know that some people don’t bother with the settings, and its performance hit is atrocious. If you have performance to spare yo ucan of course use it!
  • Will you release the source code?
    Yes, absolutely. I think I’ve shown in the past that I fully believe in sharing the source of my stuff, but I want to wait just a short while until it’s not so much in flux.

I’ll try to release a new version by Sunday, which should at the very least fix the screenshot crash. Thanks for your continued support, especially to those who made donations.