DSfix 1.1

This is a rather big one.

Bugfixes:

  • SSAO depth buffer inaccuracy fixed. Removes line artifacts from SSAO.
  • Added further renderpipeline state restoration after SMAA and checks whether we are at the correct stage. May (again) fix the SMAA issues some people are having.
  • Fixed windows scaling issue when toggling between borderless windowed fullscreen and windowed mode.

New features:

  • SSAO is now configurable in the .ini, with 3 strength presets (low, medium and high).
  • Optional high-quality DoF blur. This allows you to set the sharpness as intended while still maintaining very high DoF image quality.
  • And maybe the most requested one: HUD on/off toggle as bindable key action. Default is the right Ctrl key.

I’m a bit burnt out now after basically spending ~90% of my free time on this for almost 3 weeks. I’ll probably start getting the fix cleaned up for an open source release so that others can pick up the torch.

Here are 2 screenshots showing off what the game looks like now on a high-end system:

Screenshot 1
Screenshot 2

As always, consider donating if you like the mod.

DSfix version 1.1 download

Please please remember to read the README.txt!

Don’t set your DoF resolution to the same as your vertical rendering resolution, set it LOWER than that. Same or higher doesn’t make sense and is wrong and you shouldn’t do it and it will cause problems.

DSfix 1.0

This version fixes the following issues:

  • Crashing when alt-tabbing back into fullscreen mode
  • Correctly restore the render pipeline after the SMAA step (this may fix the sporadic issues with SMAA)

It introduces these features:

  • All the hotkeys are now configurable in DSfixKeys.ini
  • Integrated SSAO. Note that there are still some artifacts caused by the effect. The adventurous can enable the “reloadSSAOEffect” keybinding and try to tweak the VSSAO.fx effect file.

I’m not happy with the current state of the SSAO, but I wanted to get the release out because of the bugfixes and configurable keybindings that people asked for.

As always, consider donating if you like the mod.

DSfix version 1.0 download

Please please remember to read the README.txt!

I’m stupid

I just spent 2 hours fixing the alt-tab crash introduced in 0.9 when 10 minutes should have sufficed. Anyway, it’s fixed now.

For future reference: if all the symptoms point to one location in your code do look carefully at that location instead of trying to “fix” something else just because you have long-held suspicions that it might not be 100% correct.

DSfix 0.9

Edit: Updated to version 0.9.1, may fix some issues people had with SMAA. DON’T FORGET TO EXTRACT ALL THE CONTENTS OF THE ZIP TO THE DATA DIRECTORY!

I finally made some progress in better understanding how the game renders.

This release should fix some reported bugs:

  • Save backups should now be correctly limited to the amount specified
  • Language override is more resilient in case of crashes (original settings will still be restored at the next shutdown) and cleans up the registry once it restores the original settings

It also introduces 2 new features:

  • HUD-less screenshots can be taken with F5. (This is a bit slow and only does bmp right now, I’ll fix that when I have time)
  • The big one: SMAA integration.

SMAA is integrated correctly with the rendering pipline. Compared to using an injector, this means that (a) you can combine it with any amounts of downsampling (or up) as desired and (b) only the rendered image is processed. You can select the level of SMAA in the ini, from one of the predefined quality presets (off, low, medium, high and ultra).

As always, consider donating if you like the mod.

DSfix version 0.9.1 download

Please please remember to read the README.txt!

DSfix FAQ & current development

Since there are some question that are repeatedly asked (over and over again), I thought I’d put up a small FAQ.

The game crashes, help!
Make sure that you are not running any other applications that interact with Direct3D, such as various overlays. Also, some people seem to be able to solve the issue by renaming or removing the movie files in the “movWW” folder.

The game only shows up in a small part in the upper left corner!
Turn off the in-game AA option. And read the readme.

Can you improve the performance of the game?
Beyond reducing the main/dof resolution (which likely isn’t the issue on most low-end systems anyway) there is not much I can do, sorry.

Will you release the source code?
Yes, as soon as it is at least remotely presentable and I no longer make large changes daily. I hope it will help people attempt similar things for other games and/or implement the 100s of features people are asking for in Dark Souls that I will never get to.

 

Today’s Progress (or lack thereof)

What I spent most of today on was trying to make it possible to accurately track texture and surface usage through the whole application. This would enable far more fine-grained and specific changes. My idea was to wrap IDirect3DTexture and IDirect3DSurface — which also requires wrapping IDirect3DBaseTexture9 and IDirect3DResource9. Currently (up to and including 0.8) only IDirect3DDevice9 is wrapped.

The problem is that when I finished wrapping all these objects I get a crash at startup. It seems that the GFWL overlay is doing something strange with a texture it generates, and I simply cannot find out exactly what is going on. I spent hours trying to debug the issue. Now I have two options: either I give up on the idea of wrapping textures/surfaces (throwing away a day of work and the cleanest way to accomplish future modifications) or keep working on it in the hope that I can somehow track down the issue.

Neither of those seem very enticing right now, but I still lean towards the latter. My first step is to sleep over it. If I really cannot resolve the issue in the next few days I may just release the source in its current state and hope that many eyes see more than two (and that people are forgiving of terrible code).

 

DSfix 0.8

I hope all the Optimus users enjoy this one! It required quite a bit of effort. Changes:

  • DSfix is now a Direct Input wrapper instead of a d3d9.dll wrapper. This was done to fix the Optimus issue, and it should also allow people to use other additional D3D wrappers for postprocessing effects (FXAA, SMAA, etc)
  • There is a new setting “dinput8dllWrapper” which allows you to use additional DirectInput wrappers on top of DSfix should you so desire. I don’t think many people will need this, but it’s there for those who do!
  • The way logging was handled when disabled has been improved, so you could see slightly improved performance in CPU limited situations with “logLevel 0″ (the default)

When upgrading from previous versions, make sure to first delete d3d9.dll and the old .ini!

Consider donating if you like the mod.

DSfix version 0.8 download

Please please remember to read the README.txt!

Edit: before I forget, thanks to Boris Vorontsov for putting me on the right track for how to fix this issue!

DSfix 0.7

Edit: it seems the intro skipping feature isn’t working properly for most people. Just ignore it for now!

This release adds 2 new features:

  • Save game backups: backs up the saves at regular intervals. The maximum number of stored backups can also be set. I implemented this since I almost lost my save while testing. The minimum interval is set fairly high to discourage people from using this to cheat death.
  • Intro skipping. NOTE: the way this is implemented is completely insane. It works for me, but I can’t guarantee that it won’t set your computer on fire. Just turn it off if you experience problems.

Now that these convenience features are out of the way I’ll focus on the graphics again.

Consider donating if you like the mod.
Regarding donations, I was told that the donation page was in German so far, it should now be set to English.

DSfix version 0.7 download

Please please remember to read the README.txt!

DSfix 0.6

There is more changed “under the hood” here than what is visible, but I managed to fulfill 2 popular requests:

  • Added a “borderless windowed fullscreen” mode. This is very useful for people with multiple monitors, or even if you just want to do fast alt-tabbing. You can switch from windowed mode to “fake fullscreen” and back using F8. It can also be configured as a startup setting in the .ini
  • Added a language override option in the .ini
    Set it to e.g. en-GB to play the game in English without manually changing your system locale back and forth. (This is probably only useful for non-English users)

I also improved the code base significantly. Just as one example, previously adding a new setting, reading it from the .ini, making it available where it is needed and logging it required 6 or so lines of code in 4 different places. Now it’s just 1 line in 1 place.

Also, some compilation settings and manual optimizations were introduced that may make the wrapper marginally faster, but this most likely won’t have an effect on game performance.

As always, consider donating if you like the mod.

DSfix version 0.6 download

Please please remember to read the README.txt!