Hello!

It looks like you're new here. If you want to get involved, click one of these buttons!

Using 3Dmigoto to remove HUD shaders from dx10/11 games

I was recently introduced to Chiri's 3Dmigoto for changing shaders in dx10/dx11 games the same as what HelixMod allows us to do with dx9 games. 3Dmigoto is still in development but even in it's current state it has a lot of the same features that HelixMod allowed with manipulating shaders in dx9 games. You can find information on the tool and forum on Geforce and GitHub. This wiki post by bo3b is a good place to start if your interested in using the tool.

I'm not very experienced with shaders but went through the task of searching for, finding, and removing the ones that made up the HUD in the Watch_Dogs Madness level and thought I'd share the method used for disabling these and setting up a key toggle.

Finding and marking the HUD shaders
Download the latest release of 3Dmigoto and follow the steps from this wiki page. This will create a ShaderCache folder that it will fill with shaders when the game first loads. This can take awhile, start the process and go make a coffee...finish it, then make another. I found that this would sometimes stall and I would need to force close the game, delete the partial cache it had created and start again. To see it progressing I had the ShaderCache folder open on another monitor where I could see the shader files being created at about one every two seconds depending at what stage the game was loading.

Cycle through the vertex and pixel shaders with the keys below, when you get to one that disables the effect you wan to change or remove then press the marking key. You will hear a beep when the shader has been marked, this will also be copied into the ShaderFixes for you (contrary to notes in the wiki).

vertex shaders - step through with Num1 and Num2, mark with Num3.

Setting up a keybind to toggle/change effects
After finding the shaders you want, you will need to disable shader hunting and add in your toggle.

1. In the d3dx.ini file add the following constant and key to be used for our toggle.
[Constants]
;HUD on by default
x=1
[Key1]
Key=h
; hide HUD
x=0
type=toggle
[Hunting]
hunting=0

Modifying shaders code to remove that effect completely.
Next we want to edit the shader files that were marked and are now in the ShaderFixes folder to remove the effect when our toggle button is pressed.

I'll start with a sample vertex shader that formed part of the HUD in Watch_Dogs. The original shader code is below on t he left with the modified code and highlighted sections on the right.

imageimage

Make these similar changes to each of the shaders you've marked, making sure to only set the values to 0 that are declared as outputs. Some shaders will have only one output while others may have more. Then startup your game and try using the toggle, in this example I used the "h" key as the toggle which was toggling the main menu HUD.

Below is the sample final code for one of my shaders for easy copy past of the toggle code.
cbuffer FireUiPrimitive : register(b0)
{
float4 _ColorAdd : packoffset(c0);
float4 _ColorMultiplier : packoffset(c1);
float4 _DiffuseSampler0Size : packoffset(c2);
float4 _PostFxMaskViewportSize : packoffset(c3);
float4x4 _Transform : packoffset(c4);
float4x4 _UVTransform : packoffset(c8);
float4 _VideoTextureUnpack[8] : packoffset(c12);
float2 _SystemTime_GlitchFactor : packoffset(c20);
float _DesaturationFactor : packoffset(c20.z);
float _DistanceFieldFloatArray[18] : packoffset(c21);
}

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
float2 v0 : position0,
float2 v1 : texcoord2,
float4 v2 : color1,
out float4 o0 : TEXCOORD0,
out float2 o1 : TEXCOORD1,
out float4 o2 : SV_Position0)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

float4 params = IniParams.Load(0);
if (params.x == 0)
{
o0 = 0;
o1 = 0;
o2 = 0;
return;
} else {

o0.xyzw = v2.xyzw;
o1.xy = v1.xy;
r0.xy = v0.xy;
r0.zw = float2(1.000000e+000,1.000000e+000);
r1.x = dot(r0.xyww, _Transform._m00_m10_m20_m30);
r1.y = dot(r0.xyww, _Transform._m01_m11_m21_m31);
r0.z = dot(r0.xyzw, _Transform._m03_m13_m23_m33);
o2.z = dot(r0.xyww, _Transform._m02_m12_m22_m32);
r0.xy = r1.xy * float2(2.000000e+000,2.000000e+000) + -r0.zz;
o2.w = r0.z;
o2.xy = float2(1.000000e+000,-1.000000e+000) * r0.xy;
return;
}
}

Watch_Dogs sample
This will disable the main menu HUD in Watch_Dogs Madness Digital Trip level only. It may cause the game to crash if used in any other level (this crashed the game when I tried the toggle in the Spider level). Download and copy the contents into your Watch_Dogs\Bin folder. To temporarily disable rename the d3d11.dll file.

Download Watch_Dogs Madness HUD Toggle

Note: I wasn't able to get the shadercache to create for the Digital trip Spider level (the one I actually wanted this for) as it crashes every time I attempt it. If anyone is able to get a working HUD toggle for that I'd love to know about it.


Further HUD Toggles by The_Janitor using the latest version of 3Dmigato.
I've been able to create a bunch of hud toggles using version 1.1.14 you could try it on Watch Dogs, it might work better than the 1.0.1 version.

Anyway here's the hud toggles I've done so far if anyone wants them:

Deus Ex: Human Revolution
Hitman Absolution
Alien Isolation
Call of Duty Black Ops II
Call of Duty Ghosts
Call of Duty Advanced Warfare
Sniper Elite V2
Mad Max
Ryse
Tomb Raider HUD Toggle
Call of Duty Black Ops III
Assassin's Creed IV
Assassins Creed Syndicate
Splinter Cell Blacklist
Watch Dogs
«13456717

Comments

  • edited October 6
    Thanks for this, I wouldn't have figured it out on my own.

    Anyway here's the hud toggles I've done so far if anyone wants them:

    Deus Ex: Human Revolution
    Hitman Absolution
    Hitman 2016
    Alien Isolation
    Call of Duty Black Ops II
    Call of Duty Black Ops III
    Call of Duty Ghosts
    Call of Duty Advanced Warfare
    Call of Duty Modern Warfare Remastered
    Call of Duty Infinite Warfare
    Sniper Elite V2
    Mad Max
    Ryse
    Assassins Creed Syndicate
    Splinter Cell Blacklist
    Watch Dogs
    Medal of Honor Warfighter
    Homefront The Revolution
    The Division
    Mass Effect Andromeda - Big performance hit with 3Dmigoto in this game
    Titanfall 2



    If you have an AMD card and it crashes on launch, you need this additional file:

    http://www.mediafire.com/download/ydr2g23mbq86vrx/AMD+files+Win+10.rar

    (This has only been tested on Windows 10, can't guarantee it will work for every OS)

    -----------------------------------------------------------------------------------------------------------------------------------------------

    Some additional DX9 HUD toggles done with helixmod (should not require any extra files for AMD users)

    Splinter Cell Conviction
    Lost Planet
    Lost Planet 2
    Far Cry 3









  • edited July 2015

    Thanks for this, I wouldn't have figured it out on my own.

    I've been able to create a bunch of hud toggles using version 1.1.14 you could try it on Watch Dogs, it might work better than the 1.0.1 version.

    Anyway here's the hud toggles I've done so far if anyone wants them:

    Deus Ex: Human Revolution
    Hitman Absolution
    Alien Isolation
    Call of Duty Black Ops II

    thanks you for it.
  • clean HUDs

    I'm sure this will come in handy in the near future, thanks!
  • I may have to look into this shortly.

    Currently playing Metro Last Light Redux and... well I don't remember what method I used to remove the HUD last time, but whatever it was, I don't think there was a toggle. Seems like this makes it possible to create a toggle. Hopefully it's not a huge pain in the butt :)
  • I'll keep expanding the list whenever I make a new one, just added Call of Duty Ghosts.
  • I'll add these to the OP as well, great work!

  • edited August 2015
    I just realized you can even bind it to an xbox controller button, for example right under [Key1] you put this:

    [Key2]
    Key = XB_BACK
    x = 0
    type=toggle

    List of buttons:

    XB_A
    XB_B
    XB_X
    XB_Y
    XB_START
    XB_BACK
    XB_DPAD_RIGHT
    XB_DPAD_LEFT
    XB_DPAD_UP
    XB_DPAD_DOWN
    XB_RIGHT_SHOULDER
    XB_LEFT_SHOULDER
    XB_RIGHT_THUMB
    XB_LEFT_THUMB
    XB_LEFT_TRIGGER
    XB_RIGHT_TRIGGER
  • edited November 2015
    HUD toggle for Ryse, because having to type that console command everytime is a pain in the butt.

    Also you can toggle those glowing execution colors off:

    image

    Download:

    http://www.mediafire.com/download/ldxly7cx2uo6t38/RyseHUDToggle.rar

    The toggle issue has been fixed in 1.2.9, so you can now make HUD toggles with the latest version of 3Dmigoto.
  • @the_janitor

    I tried the latest version on Tomb Raider but toggling the shaders I've found just replaces them with a black box. Something to do with opaque-ness of the shader? One of the shaders I'm trying to "bypass" below. Any ideas?

    cbuffer DrawableBuffer : register(b1)
    {
    float4 FogColor : packoffset(c0);
    float4 DebugColor : packoffset(c1);
    float AlphaThreshold : packoffset(c2);
    float4 __InstancedMaterialOpacity[12] : packoffset(c3);
    }

    cbuffer InstanceBuffer : register(b5)
    {

    struct
    {
    float4 InstanceParams[8];
    float4 ExtendedInstanceParams[16];
    } InstanceParameters[12] : packoffset(c0);

    }
    SamplerState p_default_Material_00DD4274319654666_Param_sampler_s : register(s0);
    Texture2D<float4> p_default_Material_00DD4274319654666_Param_texture : register(t0);

    Texture2D<float4> StereoParams : register(t125);
    Texture1D<float4> IniParams : register(t120);

    void main(
    uint4 v0 : PSIZE0,
    float4 v1 : SV_POSITION0,
    float4 v2 : TEXCOORD0,
    out float4 o0 : SV_Target0)
    {
    float4 r0,r1;
    uint4 bitmask, uiDest;
    float4 fDest;

    float4 params = IniParams.Load(0);
    if (params.x == 0)
    {
    o0 = 0;
    return;
    } else {

    r0.x = (int)v0.x * 24;
    r1.xyzw = p_default_Material_00DD4274319654666_Param_texture.Sample(p_default_Material_00DD4274319654666_Param_sampler_s, v2.xy).xyzw;
    r0.xyzw = InstanceParameters[r0.x].InstanceParams[3].xyzw * r1.xyzw + InstanceParameters[r0.x].InstanceParams[4].xyzw;
    r0.xyz = float3(-1,-1,-1) + r0.xyz;
    o0.xyz = r0.www * r0.xyz + float3(1,1,1);
    r0.x = v0.x;
    o0.w = __InstancedMaterialOpacity[r0.x].x;
    return;
    }
    }
  • edited November 2015
    Figured it out. Found a helpful discussion on Guru3D where bo3bber suggests using "discard;" instead of "return;". For clarity the changed code would be;

    if (params.x == 0)
    {
    o0 = 0;
    discard;
    } else {
  • And here are the shader fixes for Tomb Raider. Includes:

    1. [Caps Lock] - Toggle for HUD, Main Menu, Hunter mode highlights and vignette.
    2. [L] - Toggle for DOF (including Hunter mode vignette DOF).

    Tomb Raider HUD Toggle
  • Nice. Have you done anything with any of the Assassin's Creed games? I did find the target highlight shader in ACIV but haven't tried doing a toggle for it yet..too busy pillaging and plundering!
  • ACIV is a weird one. With hunting enabled the game eats up all available RAM within about 10 minutes resulting in a crash. A little frustrating to say the least!

    I was able to find some shaders I wanted to remove but am having some trouble with the motion blur one. When it is disabled it also disables tonmapping / bloom which isn't really what I want.

    I don't really know that much about actually writing shaders, would anyone know what needs to be disabled in this code to just remove the radial blur? There are a number of variables that are named "blur" but I'm not sure what needs to be modified. I've put it on pastbin here with the toggle code already inserted.
  • edited December 2015
    One3rd said:

    Nice. Have you done anything with any of the Assassin's Creed games? I did find the target highlight shader in ACIV but haven't tried doing a toggle for it yet..too busy pillaging and plundering!

    Yeah made a marker toggle for Unity, even if you set hud options to "all hidden" the objective marker is still there. So with this you can toggle it off:

    http://www.mediafire.com/download/0khoc0kjo2pu88z/UnityToggleMarker.rar

    Also in AC Revelations I removed the outlines around NPCs:

    http://www.mediafire.com/download/23s8ln89it50v0u/RevelationsNoHighlightsMod.rar

    Gonna try to make a marker toggle for Syndicate too, and maybe remove some other stuff, like that annoying "last known position" silhouette thing.





Sign In or Register to comment.