Thursday, December 13, 2012

Darksiders (2010)

Fix by Eincrou
Updated October 14, 2014

Created using Steam version. Game version 1.1
 Update: 10/14
Skybox fix by Misterbambam


Darksiders is rated "Excllent" in NVIDIA's compatibility list, and despite my skepticism of their "Excellent" ratings after the stereoscopic disaster that is Dark Messiah of Might and Magic, I actually agree with them for once.

The game looks incredible in S3D and has few problems with anomalies.  The anomalies are either intermittent or not too bothersome.  Look at the "Problems not fixed" section for my report on the anomalies.

The biggest problem is the 100% 2D UI, especially the targeting reticles for War's various ranged weapons.  I've had nothing but failure for the past five or six games I've tried to fix, but I was finally able to make something happen with Darksiders.  I tried to address the 2D UI, though my success remains incomplete.

This fix:

  1. Menus render with depth. I gave the text slightly less depth than the menu art.  Why?  Because it looks awesome.  That's why.
  2. Depth for texts, including subtitles, can be turned off with the comma key ( , ) and turned back on with period key ( . ).  These keys can be changed in DX9Settings.ini.  Use this webpage for the key code numbers (middle column).
  3. HUD, including crosshairs, have depth.
  4. Mini-map has depth.

Problems not fixed:

  1. The HUD renders strangely, but I got around this by finding the texture elements of each crosshair. They are given as much depth as possible before the edges start clipping. One element, a pulsing circle, was left alone because that texture is reused many times.
  2. Skyboxes render too shallow. No acceptable solution has been found yet.
  3. Various effects do not render identically in both eyes - for example, the swirls around the rim of portals, the swirl around Void Walker on War's arm, fire on flaming skeletons, the chain around War's hand when Abyssal Chain is equipped, and several more.
  4. Portals have a rim effect, which renders in only the left eye.
  5. Portals show you what is on the other side when you look into them, but the world beyond the portal renders at the wrong depth.

Change Log:

  • v4: (12/16/2012)
    • Fixed crosshair for Angel-blaster-gun-thing. There's one other ranged weapon in the game, a demon-explosive-spike-throwing-thing, but it appears in only one brief part of the game.  I have no save game to get back there, so it remains unfixed.
  • v3: (12/15/2012)
    • Increased depth of crosshairs for five ranged weapons. Depth fix for crosshair of final ranged weapon coming soon. There isn't as much depth as I would like, but the textures start clipping if I go any higher.  If you have any suggestions for correcting this, let me know.
    • Increased depth of enemy target indicators
    • Changed default secondary depth setting for text (pressing the , key) from 2D to a slight bit of pop-out.
  • v2: (12/14/2012)
    • Add ability to set text to 2D. Useful for prerendered 2D cutscenes.
  • v1: (12/10/2012)
    • Initial Fix 

How to get it working:

  1. Extract the fix into the same location as DarksidersPC.exe.  For me, this is: [...]\Steam\steamapps\common\Darksiders
  2. Four of the fixed vertex shaders are personal to each system.  You will have to download the debug version of d3d9.dll to dump them.
  3. Rename the release version of d3d9.dll that you extracted from the fix zip to something temporary.  I like to use d3d9r.dll.
  4. Extract the debug version to the same directory as DarksidersPC.exe.
  5. Boot the game, and you should see red text at the top of your screen.  If not, ensure that the d3d9.dll in your Darksiders folder is the debug version.
  6. Load into the game, and enter the equipment menu.
  7. Now, use the debugger's hotkeys to search for the shaders we need.  Use NUM5 to advance and NUM4 to decrease.  I recommend going to about VS#100 and if you don't find the element, go backwards and you should hopefully find it in the 400s.
  8. Look for the following elements to turn off: [1] texts, [2] menu art, [3] sword XP progress bar, and [4] green part of the health bar.
  9. Each time you select a VS that turns off one of these elements, write a note with what that element is, and the eight-digit CRC.  The CRC is the characters after the "0x" part.
  10. When you find all four, exit the game and go into the ShaderOverride/VertexShaders directory and find the following text files: [1] 826E8EA7, [2] F516508B, [3] DA3DFC7A, [4] E3832F4F.
  11. Rename each of these filenames to the corresponding CRC you wrote down.  If you need to be extra sure of what the fixed CRCs do, you can open up the text files see my comments.
  12. Now, when you relaunch the game you should find that these four interface elements render with depth.  If not, double check that you have properly located each of your personal CRCs and matched them to the fixed CRCs.
  13. When all is working, delete or rename the debugging d3d9.dll, and rename the release version to d3d9.dll.
IMPORTANT! I need feedback on the following:
  1. I created this fix while running my graphics card in dual-GPU mode.  I tried running the fix while in single-GPU mode, and the fix caused the game's graphics to become corrupted when 3D was enabled.  I need to know if this affects people running with one GPU.  I'd also like to know if it doesn't affect SLI users.  In short, TESTERS NEEDED!

Download: (Release and debugging DLLs included)


  1. 826E8EA7, F516508B, DA3DFC7A, E3832F4F

    These four files are different for each person. They are unique CRC's. Like yours is 826E8EA7 but mine is 9999999(example). The install directory line doesnt matter but a person needs to match them up.
    Like they need to dump the file for health bars and match to yours. Its only way it will work for other people.

    1. Let me clarify.
      They need to find the shader for like enemy target pointer for example.
      Dump it and change the name to match yours. Then it should work.

      If you find the shaders for the other issues I can probably fix them.

    2. Thanks for the info, EQ. I'll add what you've said about those unique shaders to the post.

      I have the three VSs for the skybox that I was trying to fix. I'll find the shaders for the other effects later today.

      I still have no idea why the game breaks in 3D in single-GPU mode. I played around with it some more and found that the game is fine with the DLL loaded without any shaders being overriden. But when I put a shader in, even if it's completely unmodified from the dump, the game blows up in 3D mode.

      I took a quick video of this. The video is in 2D, but that's just because I was too lazy to edit the video to 3D HSBS format for Youtube. The graphics are fine in 2D.

  2. Thank you for the fix , i waited for it since a long time.

    1. Thanks for your interest. It's still very much a work in progress. I fixed everything I knew how to fix, and I'm hoping to learn how to fix the rest.

      If you try playing the game with the fix, let me know if it worked, or if you had problems. And also check back again soon. There will be some updates with improvements.

  3. Thanks for this fix! ...I was trying to fix it too little time ago, but I had graphics corruptions like you described... and yes I've got a single gpu. I'll try again starting the game with your fix and make you know what happens... I hope I can help you with this.

    1. Hi, Mana. I'm kind of glad that you had the problem, too. I'd hate for it to be because my hardware is going bad!

      Let me know what happens if you try it. I managed to figure out how to increase the depth of the crosshairs that render with a strangely low amount of depth. Now I really need some help fixing the skybox. If you want to take a look at them, the original skybox vertex shaders are included in the latest version of the fix.

    2. Certain games have that wierd issues in Single GPU mode. I tried to figure it out but couldnt.
      Darksiders, Devil May cry 4, Kingdoms of amalur, a few others I cant remember.
      Ive had it happen then had trouble replicating it in a few instances.

      Setting Maximum pre-rendered frames to 1 in nvidia control panel MAY fix it. It helps, Im not sure if it will fix it or not since its tied to convergence/depth.

    3. I've just tested your fix but I still had the issue... and I don't have a second gfx card to test with. Even forcing pre-rendered frames to 1 like eqzitara suggested don't work for me.
      Anyway I've looked at your skybox files and they seems to contain depth information into r0.z.. I believe this ones should work:
      If it doesn't make me know that I'll give it another try... sorry but I can't test personally becouse of the shaders corruption thing :(

    4. Sorry this game doesn't work with Helix Mod on one GPU. It's weird.

      I tried your skybox shaders and it works. The skybox elements get pushed back. Too far back, actually. How can I change their depth? Thanks for helping.

    5. renaming the exe to Masseffect.exe worked!! o.O
      that's strange becouse I believe I had already given a go to renaming the exe before but believe to remember it didn't work... although eqzitara has right about the fact this game has unique CRC's for some shaders, for example minimap does work with my game (steam version) but HUD and crosshair doesn't.
      I'll dump my hud shaders and make you know.. how did they generate random names for shaders? Would my shader names help some other peoples to make their game version to work too? ..if we could know that their names are related to region/version/gfx card/something else, we could do different versions of the fix...

    6. CRC names are generated based on install directory I believe.

      Helix found/wrote a solution in his newest debugger (alternate crcs?). I do not have/understand his newest debugger so it doesnt matter regardless. The same issue is in darksiders 2 and he was able to resolve it.

    7. my code didn't work becouse depth information isn't correct in skybox shaders.. so a simple rescale can do the job... I've updated and it seems to work for me now, redownload it and make me know ;)

    8. @eqzitara oh thanks I missed that... I'll look at darksiders 2 page and I'll try to see to understand how he used the new debugger... maybe we'd need a new helix guide on how it works though :/

      @Eincrou I forgot to mention meantime I found and inserted in the zip archive another vertex shader for the background (26759442.txt) since in the level I'm testing with, there was a "dark" tower on the background at the same "wrong depth" of the skybox. I've added 26759442.txt (fixed) to the zip.

    9. LOL, Mana. I added your original fix code to that same shader 26759442 a few hours ago. It had some weird results in the place where I was looking at the tower, but I trust that your new code improves it. I'll let you know.


      The first two are of the tower on VS-26759442. It seems like the developers got lazy and cheated on it, because you shouldn't be able to tell differences in depth on the tower from that far away. It should appear completely flat at that distance from the camera.

      The third screenshot is the best place to see the skybox, in a Serpent Hole. Skybox elements are too close again with the new fix code.

    11. wow sorry I didn't know you could reach that tower in the game :) ..I'm not playing many games lately and I haven't played this game yet becouse I'm really busy lately (since months). So we can't definitely fix the tower with a simple rescaling and we'd need to put it at right depth. Anyway you "should" be able to fix skybox increasing the "3000" I've put into c220.x... usually skyboxes should be put at "infinity" distance... although I don't really know how skyboxes looks in this game... maybe they used the same shaders to draw some sky "special effects"... I'd probably need a savegame to be able of help you more..


      Here's a save I made a few days ago at the base of the giant tower. In the cave where you'll start is a path leading to Vulgrim where you can enter the Serpent Hole. The skybox is very easy to see in the Serpent Hole.

    13. Oh, I guess I should add that the save goes in C:\Users\[...]\Documents\my games\Darksiders\24864679.
      The game uses Steam Cloud for save games, so you might have to disable that to import the save. I'm not sure if it will overwrite it when it syncs with the cloud.

    14. uhm... you've right it uses steam cloud, I'll try to put steam in offline mode or to disable steam cloud this evening/night (Central European Time UTC+1) and I'll keep you updated!

    15. unfortunately your savegame don't work with my game, it appears in the game loading menu but it can't load because the game thinks its corrupted. I'll try to advance in the game to see if I can see more of the tower/skybox thing.. I'll make you know when/if I'll get into something good.

    16. renaming to masseffect.exe seems to messup some shaders (flames, smoke effects and others) :( ...the game looked perfectly (apart from skybox and hud) with original exe name. I've tried to fix them (fastly though) but they seems to be unfixable without editing pixel shaders too... I'm sorry but its too much work for me in this period. I'll see to do what I can...

    17. Thanks for trying, Mana. The fix is in a good state for those who can play with SLI or a 590, 690, etc.

      There are some other issues that I don't know how to fix, like the world beyond portals. Maybe I'll try your skybox code and see what happens. These problems are pretty minor. Fixing the UI was the most important thing to make it comfortable to play.

      There are probably answers for how to fix that stuff in the mammoth Helix Mod thread on the NVIDIA forums, but that thing is completely unreadable. If I can better learn how all of this stuff works, I will create tutorials to help people trying to learn.

      Right now it's very difficult to learn how to create fixes. I learned a lot (relative to what little I knew before) working on Darksiders, but I had to look at code from other people's fixes to see how to do certain things. People don't comment their shit, so it was tough to tell what was going on. LOL I took a couple months of Java in high school 8 years ago. I'm no coding wizard.

      It's a waste of time for someone to have to learn like that. So, I'm going to create some video tutorials on the basics. As I learn more, I can create more and more tutorials on how to do specific things.

    18. I'm at the beginning of the game so I haven't seen a portal yet... but I like this game so I could try to fix portal as soon as I see them and eventually tell you how I fixed them.

      Create a tutorial would be a huge work for me becouse I'm going to take academic degree, plus the fact that I'm not english... I'm italian and I take a while to try writing something that does make a sense in english :/
      Another problem is that there's always something I have to learn too.. I've not much experience with shaders in general, I'm still in the learning phase..
      However I like to help peoples who want to learn something about this, make me know what are your doubts I'll try to teach you what I've learned about.
      Although I see often peoples don't even try to just disable problematic shaders (there's a tutorial for that).

    19. I've just defeated Tiamat but I haven't seen a portal yet... I'm sorry but I'm a bit slow becouse I haven't much time to play. Anyway I'm playing with the standard profile becouse with masseffect.exe particle effects, fog and some lights are causing an annoying ghosting. Unfortunately they seems to be impossible to fix only by vertex shaders and it seems to be a lot of work find and fix related pixel shaders too. Maybe another profile could do the trick but I tried prototype and ofdr without good results. I'll continue to play untill I can see the tower nearby and untill I can see a portal... I just want to help you for now... meantime I'm enjoying the game too ;)

    20. Yeah, try to enjoy your game. You won't get the portal gun until about 12 hours in; near the end of the game.

      Sorry this game doesn't work like it should with the Helix Mod. I had no idea there was a problem until I accidentally started playing in single-GPU mode.

  4. Renaming to Aion.exe seems to work like a charm with a single gpu! :)
    It's not like masseffect.exe, so effects aren't messed up!
    Could you try that code with the tower at wrong depth? I'm still to far from it to test, I'm fighting with the "Griever" now..

    def c220, 0, 0, 0.0625, 0
    dcl_2d s0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord o0.xy
    dcl_position o2
    dp3 o1.x, v1, c0
    dp3 o1.y, v1, c1
    dp3 o1.z, v1, c2
    mov o0.xy, v2
    dp4 r0.x, v0, c8
    dp4 r0.y, v0, c9
    dp4 r0.z, v0, c11
    texldl r11, c220.z, s0
    add r11.y, c220.w, -r11.y
    mul r11.x, r11.x, r11.y
    add r0.x, r0.x, -r11.x
    mov o2, r0.xyzz


      You have done it. I'll study this code and try to figure out what you did. Hopefully a similar thing can be done to the rest of the skybox.

  5. This comment has been removed by the author.

  6. I'm glad it works!
    The formula we use to correct objects at wrong depth is that:

    Xnew = Xold - separation * (W - convergence)

    -'Xold' is the x coordinate of the position output register
    -'W' is the w coordinate of the position output register and it gives information about object's depth
    -'separation' is the value of the 3d vision depth we are using, we can store it into a temporary register (i.e. r11.x) using texldl instruction with a stereo sampler (i.e. s0) and passing a constant of '0.0625'
    -'convergence' is the value of the 3d vision convergence we are using, we can store it into a temporary register (i.e. r11.y) in the same way we did with 'separation'.

    moving an object's x coordinate using the stereo texture make it appear further into the screen becouse you are moving the left eye image to the left and the right eye image to the right (separation is increased). The offset we use to move the object's x coordinate is given by that fourmula becouse we need to rescale the stereo separation by the distance of the object from the convergence plane.

    The issue with this shader is that we can't use the w coordinate of the position output register becouse the information about object's depth isn't 'correct' the tower's depth is "tricked", so I tried to offset the stereo separation by the distance of a constant (in that case is zero) from the convergence plane.

    A useful way to know if the shader can access at the necessary depth information is to search for a viewprojection matrix. Objects coordinates are not absolute... they are always relative to something, they can be relative to 'world', to 'camera' or something else coordinates...
    3d vision adds a second camera to the side of the original one, some effects are coded with a single camera in mind so we can see ghosting artifacts in stereo3d becouse their coordinates are related to the original camera. Basically we have to search for registers containing vertices that are relative to the viewprojection matrix, becouse we want to move object's coordinate that are relative to the vertices projected to the screen from the view space of the camera.

    I hope I've clarified something about it and to be of help for someone else... I'm sorry for eventual imprecisions or mistakes but I'm doing my best...

  7. too bad i've just finished it without using the mod, by the way the game was totally enjoyable even without fixes, the most annoying things was the sky and war's hand after having acquired one of the latest items, and i've read that has not been fixed by this mod.
    thanks anyway, i'm going to start darksiders 2 soon, just got from steam sales.

  8. This comment has been removed by the author.

    1. Mana, thanks for the explanation for how you fixed the tower. It helps a lot. After I finish with a video project I'm working on, I will create some video tutorials on the basics of creating fixes. You put a lot of work into that explanation, but nobody will see it except those who look at this page. We need an better way to put info like this in a way people can find. A tutorial series is a good way to do this, so I'm going to work on that.

      Wow, so even the crosshair texture CRCs are unique? Well, that's what I thought was the most important part of this fix! I guess the fix is not too useful for most people who don't know how to find textures. Well, at least I learned A LOT from working on this game. I'm still going to release another version that has skybox fix soon.

      Thanks for your help with this fix.

    2. OPS I deleted my previous comment by mistake... I'll copy-paste it below this post... sorry :)

      I'd like to possibility of edit comments but I can't, I wanted to delete only the part related to unique texture crcs... nevermind I'm in late becouse you already read it... I actually wanted to say that texture crcs are NOT unique! I had your first version of the fix that didn't contain my actual weapon's crossair crc and I believed it was unique for my game so I searched for its texture and added it in my dx9settings.ini.. but it was NOT neccessary since the crcs I've foud are exactly the same of your latest version of the fix... sorry for the wrong post, I just compared my dx9settings.ini after I had already posted the comment.

      Previous removed comment:
      @tigermaster: This game deserved to be fixed a lot earlier, but I believe we leaved this game "unfixed" so long becouse of per user different crcs and becouse of shader corruption with a single gpu. I got the sequel from steam sales too ;)

      @eincrou: I can't remember if I already told you or if you are already aware of it... hud shaders are "per user" unique even in their texture crcs.. I used your code for vertex shaders but I had to search for crosshair textures to make crosshair fix to work. Anyway I want to say you've done a great work and I like your precision and your care about naming and commenting each file!

  9. Hey, I finally tried this fix. Found the shaders described, wrote numbers, changed vertex shader names for fix to match. The HUD elements all are working as they should, but there is some horrible shading problem in the game (huge black areas that make you cross eyed). I made a screen shot and uninstalled the fix files (kept a backup). Could this be something to do with the fix being done on SLI? BTW I did switch the .dll (no red text) but the issue persisted. Did I miss something?
    drastic00, GeForce Forums

    1. Yes, this single-GPU issue is mentioned at the bottom of the OP. I discovered it by accident when I disabled one of my GPUs, and I believe Mana84 also confirmed that he had the same problem. However, it's not because the fix was made with SLI enabled. That has nothing to do with a game's shaders.

      The Helix Mod .dll itself causes this problem, even if no shaders are modified at all. I don't think any other game has had this problem, but I don't know of any solution other than to play with SLI.

    2. Eqzitara has seen this issue before and he made some suggestions upthread (almost exactly a year ago!) See if this helps.

  10. Oh and if it was not clear, I am on single GPU (GTX 650 Ti)

    1. Start fix and see if you can find which txt/shader causes it.
      TBH, I dont have game and I'm not sure how likely it will be to figure it out.

  11. Ah yes, just watched the youtube of corrupt graphics. It looks like that. Bummer, the HUD and all looks so cool at depth...

    1. Ah I missed that.
      Grab my dx9settings.ini for devil may cry 4 and it MIGHT fix it.

  12. I just had some weird crud happen (I use Steam mover). I could previously manually load the game from my secondary drive D:, but Steam on C: could not find executable. I moved the game to C: so Steam could find it again. Visual C++ updated, etc. Now the HUD shaders are lost, with ANY .dll or .inf that I try. Perhaps it has something to do with moving it, not sure.

    Basically I tried both the DMC4 files and DS Fix files, but HUD depth was gone.

    So, it looks like I may need to try and find the shaders again and reenter the codes for them. I'm tired, but I'm going to try that again tomorrow, with and without the DMC4 files and see what happens.

    Thanks for your quick responses guys, and I'll post what happens!


    1. No, just dmc4's d3d9.dll + dx9settings.ini
      The dx9settings.ini has code in it that fixes an non-sli issue. I have no idea which the game has. [Like the dmc dx9settings/d3d9.dll will fix a particualar non-sli issue in DMC4 + a game called Blades of time] [Same for serious sam 3 bfe/fallout 3 new vegas but it doesnt sound like the same non-sli issue].

    2. NM,
      I got game in a bundle, Ill try it tomorrow.
      It doesnt sound normal. I just reread everything. It only happens when fix is installed for non-sli users... I've never heard of that. Only non-sli/sli issues I know of happen regardless of fix or not.

    3. game isn't loading.

      Can try this.
      If it doesnt work your out of luck.

  13. OK so I got the menus and HUD back at depth but the dll and inf for DMC4 has the same effect. I'll try the Darksiders 4 fix and see...

  14. I mean the file you linked, rather...

  15. Hmm, same thing. Oh well we tried. Thanks! Guess I'll continue playing as it was. Not bad, but woulda been nice to have the 2D stuff render at depth as well. Weird issue. I'll watch this page in case.

  16. I'm trying to identify the four variable shaders, but I can't find the one for the health bar - it just never turns off, after going through every shader. Found the others with no problems. Any tips?

    1. Vertex shaders at index 0 don't get automatically disabled when selected. Try pressing the HOME key on VS#0 to manually add it to the skip list. Since you couldn't find the health bar anywhere else, I think it's very likely to be VS#0.

      I think the extra stuff in the shaderoverride folder is pretty self explanatory, but you don't need to change anything except the filenames of the four shaders listed in the instructions.

    2. Hey thanks, I found it! Turns out it was the one directly after the shader that turns off the menu art, so I was skipping past it accidentally. Thanks for your help though!

      I'm only seeing a tiny amount of depth on crosshairs, not enough to make a useful difference. Is that something I need to adjust manually, or is that as far as they could be pushed before creating other issues?

      Finally, I see talk of skybox fixes - did you ever manage to fix that?

      Thanks for the help!

    3. Your crosshairs don't have much depth because there was a step I forgot to include in the instructions. You have to open DX9Settings.ini and change the line [VSF516508B] to match the crc of your personal vertex shader for the main HUD. Replace the text of the original crc, "F516508B," with the same value you renamed F516508B.txt to.

      The crosshairs may still have less depth than you'd like, though. I went as deep as possible before textures started clipping. But it should still be better than screen depth. It should look like this:

      As for the skybox, we never got that fixed. But Mana84 did fix the huge tower in the background. Copy VertexShader_377_CRC32_26759442.txt from the original skybox shaders folder and paste it in the VertexShaders folder with the rest of the fixed shaders. Rename it to 26759442.txt and replace the code with Mana's code here:

    4. Thanks for the tips - that seems to have fixed the tower, however the crosshairs are seeing an interesting new issue. I imagine it's probably the texture clipping you mentioned, and may be because I play at 100% depth. Still, it's better than it was before, even with the glitch.

    5. Thanks for posting a screenshot of the issue. That's definitely the texture clipping problem.

      You can change the depth value for the crosshairs. Open the shader for the main HUD (the same shader you added to DX9Settings.ini) and find the line that says:

      def c220, 0.42, 9, 0.0625, 0

      Reducing 9 to a smaller number should reduce the amount of clipping by giving the crosshairs less depth. Mess around with values until you find an acceptable balance between clipping and crosshair depth.

      If you use the debugging dll, you should be able to edit the shader without restarting the game. Pressing F10 will reload shaders after you tab back into the game.

  17. I'm also confused by the contents of the shaderoverride folder. Do I need to do anything with the Skybox folder, for example?

  18. I can verify that I get graphic corruption and huge slow down on single GPU (GTX970) with 3D enabled. Even after I rename the exe to both massefect.exe AND Aion.exe. I guess it's either play this game in 2D only, or get a new power supply, SLI capable Motherboard and a second GTX970 to get it to work in 3D.

    1. Worth trying some other drivers. There is a lot of variability on the drivers, including different profiles.

      Might be worth trying to see if you can get it running in 3D, with no corruption on single card, and if so, it should be possible to adapt the fix to the different shaders. (sort of a specific fix for single card.)