Van Helsing
  3 / 3    
[quote="Blacksmith56"]So how does the renewed version look like - is it ok with the old fix ?[/quote] Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important. Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content. Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning. I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code. EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.
Blacksmith56 said:So how does the renewed version look like - is it ok with the old fix ?

Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important.

Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content.
Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning.

I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code.

EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.
[quote="SKAUT"][quote="Blacksmith56"]So how does the renewed version look like - is it ok with the old fix ?[/quote] Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important. Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content. Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning. I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code. EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.[/quote] Other areas are really great. This one for example.
SKAUT said:
Blacksmith56 said:So how does the renewed version look like - is it ok with the old fix ?

Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important.

Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content.
Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning.

I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code.

EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.

Other areas are really great. This one for example.
[quote="SKAUT"][quote="SKAUT"][quote="Blacksmith56"]So how does the renewed version look like - is it ok with the old fix ?[/quote] Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important. Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content. Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning. I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code. EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.[/quote] Other areas are really great. This one for example.[/quote] That looks awesome - and you are just using the fix for VH 3 in the combined game ?
SKAUT said:
SKAUT said:
Blacksmith56 said:So how does the renewed version look like - is it ok with the old fix ?

Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important.

Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content.
Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning.

I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code.

EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.

Other areas are really great. This one for example.


That looks awesome - and you are just using the fix for VH 3 in the combined game ?

Win7 64bit Pro
CPU: 4790K 4.8 GHZ
GPU: Aurus 1080 TI 2.08 GHZ - 100% Watercooled !
Monitor: Asus PG278QR
And lots of ram and HD's ;)

#33
Posted 11/08/2015 04:33 PM   
[quote="Blacksmith56"][quote="SKAUT"][quote="SKAUT"][quote="Blacksmith56"]So how does the renewed version look like - is it ok with the old fix ?[/quote] Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important. Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content. Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning. I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code. EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.[/quote] Other areas are really great. This one for example.[/quote] That looks awesome - and you are just using the fix for VH 3 in the combined game ?[/quote] Yes.
Blacksmith56 said:
SKAUT said:
SKAUT said:
Blacksmith56 said:So how does the renewed version look like - is it ok with the old fix ?

Still checking but after five hours I only found two broken shaders. Mostly look great thou. Whole environment is perfect in 3D with fix. Only water reflection in Borgovia are messed up (Second act in first Episode I guess) and some bright, ghosting looking elements (they are not ghosting thou). But that is in just a few moments - really not important.

Whole game is a really good improvement. From very beginning you got all characters to choose from and they are with new type of skill tree - massive one. You got all DLCs included and extra new story content.
Those new textures looks great as well. Whole game look more clear and like more visually advanced. Hard to explain but it is like more realistic - maybe that is because better lightning.

I had only second and third version so I bought first one for like £5 and then I went to theirs support service to get that free game code and that`s it. Process is quick because they checking your Steam account (have to be set to Public) and then they are giving you new code.

EDIT: In this place you can see both of those issues. Water reflection and that similar to ghosting effect on Van Helsing. But this is only in this area.

Other areas are really great. This one for example.


That looks awesome - and you are just using the fix for VH 3 in the combined game ?

Yes.
Have you tried different profiles, where the game is broken. Switching to The Witcher or Prototype profile corrects the start screen with the lion statue on the right... I haven't got the time to play further in the game right now, so please update here if you come up with any new info.
Have you tried different profiles, where the game is broken.

Switching to The Witcher or Prototype profile corrects the start screen with the lion statue on the right...
I haven't got the time to play further in the game right now, so please update here if you come up with any new info.

Win7 64bit Pro
CPU: 4790K 4.8 GHZ
GPU: Aurus 1080 TI 2.08 GHZ - 100% Watercooled !
Monitor: Asus PG278QR
And lots of ram and HD's ;)

#35
Posted 11/08/2015 08:13 PM   
[quote="Blacksmith56"]Have you tried different profiles, where the game is broken. Switching to The Witcher or Prototype profile corrects the start screen with the lion statue on the right... I haven't got the time to play further in the game right now, so please update here if you come up with any new info.[/quote] Nop. Changing to another profiles didn`t help at all. The shader have to be fixed ones again.
Blacksmith56 said:Have you tried different profiles, where the game is broken.

Switching to The Witcher or Prototype profile corrects the start screen with the lion statue on the right...
I haven't got the time to play further in the game right now, so please update here if you come up with any new info.

Nop. Changing to another profiles didn`t help at all. The shader have to be fixed ones again.
I found that broken Shader but disabling it makes water look like bad textured swamp.
I found that broken Shader but disabling it makes water look like bad textured swamp.
Looks like this Shader been fixed before because is in the folder but this time have some sky reflection in it so it`s basically broken. I will switch that off so water will be disabled completely.
Looks like this Shader been fixed before because is in the folder but this time have some sky reflection in it so it`s basically broken. I will switch that off so water will be disabled completely.
Use this if you want that disabled water.
Use this if you want that disabled water.
and this is the broken shader if someone know how to fix it.
and this is the broken shader if someone know how to fix it.
This one is with more disabled shaders. That Lion head in menu as well - maybe this was related to other elements because looked like environmental effect.
This one is with more disabled shaders. That Lion head in menu as well - maybe this was related to other elements because looked like environmental effect.
Great Work - so far it looks good :) thanks..
Great Work - so far it looks good :)
thanks..

Win7 64bit Pro
CPU: 4790K 4.8 GHZ
GPU: Aurus 1080 TI 2.08 GHZ - 100% Watercooled !
Monitor: Asus PG278QR
And lots of ram and HD's ;)

#42
Posted 11/10/2015 03:45 PM   
While I was doing the fix for Shadow Complex (which is almost complete), I got frustrated because I need 12 key cards to reach the fusion helmet (I want to clear all the map just in case) and switched for a while to Van Helsing Final Cut. Having to delete the Steam overlay renderer every time I started Steam was annoying, and I was getting better frame pacing in DX11, so I started fixing the game in DX11. Comparing it to the DX9 fix, I have fixed a pair of effects that aren't fixed in the DX9 version (the water in the barrel near the smith in Markovna, and the balls in the teleporter with the high shaders option disabled). I have some questions for the fixer/fixers of the DX9 version: 1- How far into the game did you have to be to see all broken shaders? I finished the first game 2 years ago and took me 30 hours. This is 3 games in 1. I'll have to spend points in different spells to see all kind of effects I can. 2- For now I have fixed around 20 shaders, but there is only one giving me problems: the lighting the main character casts into the ground, which is also for spells lighting, some other lights, etc. The problem seemed simple at first. Haloing, like many other shaders. But in this one, applying the typical fix to the texcoord moved the effect to screen depth, fixing haloing but breaking the position, which was OK before the fix. Look at the blur lighting of the attack and the light on the ground under the character. Ignore the HUD, I was skipping one of the shaders so I could take the screenshots when pausing the game. Haloing but good position (I was golding F9 here, so you'll see other shaders unfixed): [img]http://u.cubeupload.com/masterotaku/VanHelsingHalo.jpg[/img] Haloing fixed but screen depth position: [img]http://u.cubeupload.com/masterotaku/VanHelsingScreenDept.jpg[/img] If someone with good 3Dmigoto knowledge know how to fix it, here is the untouched vertex shader (7bd5ccb9980f40e0-vs_replace.txt): [code]// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:41:28 2016 cbuffer _Globals : register(b0) { row_major float4x4 _g_matVP : packoffset(c0); row_major float4x4 _g_matWorld : packoffset(c4); } // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : POSITION0, out float4 o0 : SV_Position0, out float4 o1 : TEXCOORD0) { float4 r0,r1; uint4 bitmask, uiDest; float4 fDest; r0.xyzw = _g_matWorld._m10_m11_m12_m13 * v0.yyyy; r0.xyzw = v0.xxxx * _g_matWorld._m00_m01_m02_m03 + r0.xyzw; r0.xyzw = v0.zzzz * _g_matWorld._m20_m21_m22_m23 + r0.xyzw; r0.xyzw = v0.wwww * _g_matWorld._m30_m31_m32_m33 + r0.xyzw; r1.xyzw = _g_matVP._m10_m11_m12_m13 * r0.yyyy; r1.xyzw = r0.xxxx * _g_matVP._m00_m01_m02_m03 + r1.xyzw; r1.xyzw = r0.zzzz * _g_matVP._m20_m21_m22_m23 + r1.xyzw; r0.xyzw = r0.wwww * _g_matVP._m30_m31_m32_m33 + r1.xyzw; o0.xyzw = r0.xyzw; o1.xyzw = r0.xyzw; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.30 on Wed Feb 17 22:41:28 2016 // // // Buffer Definitions: // // cbuffer $Globals // { // // row_major float4x4 _g_matVP; // Offset: 0 Size: 64 // row_major float4x4 _g_matWorld; // Offset: 64 Size: 64 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // POSITION 0 xyzw 0 NONE float xyzw // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float xyzw // TEXCOORD 0 xyzw 1 NONE float xyzw // vs_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[8], immediateIndexed dcl_input v0.xyzw dcl_output_siv o0.xyzw, position dcl_output o1.xyzw dcl_temps 2 mul r0.xyzw, v0.yyyy, cb0[5].xyzw mad r0.xyzw, v0.xxxx, cb0[4].xyzw, r0.xyzw mad r0.xyzw, v0.zzzz, cb0[6].xyzw, r0.xyzw mad r0.xyzw, v0.wwww, cb0[7].xyzw, r0.xyzw mul r1.xyzw, r0.yyyy, cb0[1].xyzw mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw mad r1.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw mad r0.xyzw, r0.wwww, cb0[3].xyzw, r1.xyzw mov o0.xyzw, r0.xyzw mov o1.xyzw, r0.xyzw ret // Approximately 11 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] Both "o0.x-=separation*(o0.w-convergence);" and "o1.x+=separation*(o1.x-convergence);" (only one of those) makes the effect be at screen depth. With both applied, they nullify each other. This is the pixel shader (5c6fca88699c090a-ps_replace.txt): [code]// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:41:55 2016 cbuffer _Globals : register(b0) { float3 _g_vCamEye : packoffset(c0); float _g_fCamFar : packoffset(c1); float3 _g_vCamFrustumCorner00 : packoffset(c2); float3 _g_vCamFrustumCorner01 : packoffset(c3); float3 _g_vCamFrustumCorner10 : packoffset(c4); float3 _g_vCamFrustumCorner11 : packoffset(c5); float2 _g_vRTResHalfRecip : packoffset(c6); float _g_fFogZMax : packoffset(c7); float _g_fFogHMax : packoffset(c8); float _g_fFogHMin : packoffset(c9); float _g_fFogCamera : packoffset(c10); float _g_fFogTanIn : packoffset(c11); float _g_fFogTanOut : packoffset(c12); float3 _g_vPointLightPos : packoffset(c13); float _g_fPointLightRange : packoffset(c14); float _g_fPointLightAttenuation : packoffset(c15); float3 _g_vPointLightDiffuseColor : packoffset(c16); float _g_fPointLightFogPower : packoffset(c17); } SamplerState _g_sG_DepthPoint_s : register(s0); SamplerState _g_sFogGradientLight_s : register(s1); Texture2D<float4> _TMP51 : register(t0); Texture1D<float4> _TMP52 : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, float4 v1 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0,r1,r2; uint4 bitmask, uiDest; float4 fDest; r0.xyz = _g_vCamFrustumCorner11.xyz + -_g_vCamFrustumCorner01.xyz; r1.xy = v1.xy / v1.ww; r1.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5); r0.xyz = r1.xxx * r0.xyz + _g_vCamFrustumCorner01.xyz; r2.xyz = _g_vCamFrustumCorner10.xyz + -_g_vCamFrustumCorner00.xyz; r2.xyz = r1.xxx * r2.xyz + _g_vCamFrustumCorner00.xyz; r0.xyz = -r2.xyz + r0.xyz; r0.xyz = r1.yyy * r0.xyz + r2.xyz; r1.xy = _g_vRTResHalfRecip.xy + r1.xy; r0.w = _TMP51.SampleLevel(_g_sG_DepthPoint_s, r1.xy, 0).x; r0.xyz = -_g_vCamEye.xyz + r0.xyz; r0.xyz = r0.www * r0.xyz + _g_vCamEye.xyz; r0.w = _g_fCamFar * r0.w; r0.w = r0.w / _g_fFogZMax; r0.w = _TMP52.SampleLevel(_g_sFogGradientLight_s, r0.w, 0).w; r1.xyz = -_g_vPointLightPos.xyz + r0.xyz; r0.x = -_g_fFogHMin + r0.z; r0.y = dot(r1.xyz, r1.xyz); r0.y = rsqrt(r0.y); r0.y = 1 / r0.y; r0.y = saturate(r0.y / _g_fPointLightRange); r0.y = 1 + -r0.y; r0.z = r0.y * r0.y + -9.99999997e-007; r0.y = log2(r0.y); r0.y = _g_fPointLightAttenuation * r0.y; r0.y = exp2(r0.y); r1.xyz = _g_vPointLightDiffuseColor.xyz * r0.yyy; r0.y = cmp(r0.z < 0); if (r0.y != 0) discard; r0.y = -_g_fFogHMin + _g_fFogHMax; r0.x = saturate(r0.x / r0.y); r0.x = max(_g_fFogCamera, r0.x); r0.x = log2(r0.x); r0.x = _g_fFogTanIn * r0.x; r0.x = exp2(r0.x); r0.x = 1 + -r0.x; r0.x = log2(r0.x); r0.x = _g_fFogTanOut * r0.x; r0.x = exp2(r0.x); r0.x = 1 + -r0.x; r0.x = 3.1415 * r0.x; r0.x = cos(r0.x); r0.x = r0.x * 0.5 + 0.5; r0.x = 1 + -r0.x; r0.x = saturate(r0.x * r0.w); r0.x = 1 + -r0.x; r0.x = log2(r0.x); r0.x = _g_fPointLightFogPower * r0.x; r0.x = exp2(r0.x); r0.xyz = r1.xyz * r0.xxx; o0.xyz = min(float3(10,10,10), r0.xyz); o0.w = 1; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.30 on Wed Feb 17 22:41:55 2016 // // // Buffer Definitions: // // cbuffer $Globals // { // // float3 _g_vCamEye; // Offset: 0 Size: 12 // float _g_fCamFar; // Offset: 16 Size: 4 // float3 _g_vCamFrustumCorner00; // Offset: 32 Size: 12 // float3 _g_vCamFrustumCorner01; // Offset: 48 Size: 12 // float3 _g_vCamFrustumCorner10; // Offset: 64 Size: 12 // float3 _g_vCamFrustumCorner11; // Offset: 80 Size: 12 // float2 _g_vRTResHalfRecip; // Offset: 96 Size: 8 // float _g_fFogZMax; // Offset: 112 Size: 4 // float _g_fFogHMax; // Offset: 128 Size: 4 // float _g_fFogHMin; // Offset: 144 Size: 4 // float _g_fFogCamera; // Offset: 160 Size: 4 // float _g_fFogTanIn; // Offset: 176 Size: 4 // float _g_fFogTanOut; // Offset: 192 Size: 4 // float3 _g_vPointLightPos; // Offset: 208 Size: 12 // float _g_fPointLightRange; // Offset: 224 Size: 4 // float _g_fPointLightAttenuation; // Offset: 240 Size: 4 // float3 _g_vPointLightDiffuseColor; // Offset: 256 Size: 12 // float _g_fPointLightFogPower; // Offset: 272 Size: 4 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // _g_sG_DepthPoint sampler NA NA 0 1 // _g_sFogGradientLight sampler NA NA 1 1 // _TMP51 texture float4 2d 0 1 // _TMP52 texture float4 1d 1 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float // TEXCOORD 0 xyzw 1 NONE float xy w // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[18], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture1d (float,float,float,float) t1 dcl_input_ps linear v1.xyw dcl_output o0.xyzw dcl_temps 3 add r0.xyz, -cb0[3].xyzx, cb0[5].xyzx div r1.xy, v1.xyxx, v1.wwww mad r1.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000) mad r0.xyz, r1.xxxx, r0.xyzx, cb0[3].xyzx add r2.xyz, -cb0[2].xyzx, cb0[4].xyzx mad r2.xyz, r1.xxxx, r2.xyzx, cb0[2].xyzx add r0.xyz, r0.xyzx, -r2.xyzx mad r0.xyz, r1.yyyy, r0.xyzx, r2.xyzx add r1.xy, r1.xyxx, cb0[6].xyxx sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.yzwx, s0, l(0.000000) add r0.xyz, r0.xyzx, -cb0[0].xyzx mad r0.xyz, r0.wwww, r0.xyzx, cb0[0].xyzx mul r0.w, r0.w, cb0[1].x div r0.w, r0.w, cb0[7].x sample_l_indexable(texture1d)(float,float,float,float) r0.w, r0.w, t1.xyzw, s1, l(0.000000) add r1.xyz, r0.xyzx, -cb0[13].xyzx add r0.x, r0.z, -cb0[9].x dp3 r0.y, r1.xyzx, r1.xyzx rsq r0.y, r0.y div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y div_sat r0.y, r0.y, cb0[14].x add r0.y, -r0.y, l(1.000000) mad r0.z, r0.y, r0.y, l(-0.000001) log r0.y, r0.y mul r0.y, r0.y, cb0[15].x exp r0.y, r0.y mul r1.xyz, r0.yyyy, cb0[16].xyzx lt r0.y, r0.z, l(0.000000) discard_nz r0.y add r0.y, cb0[8].x, -cb0[9].x div_sat r0.x, r0.x, r0.y max r0.x, r0.x, cb0[10].x log r0.x, r0.x mul r0.x, r0.x, cb0[11].x exp r0.x, r0.x add r0.x, -r0.x, l(1.000000) log r0.x, r0.x mul r0.x, r0.x, cb0[12].x exp r0.x, r0.x add r0.x, -r0.x, l(1.000000) mul r0.x, r0.x, l(3.141500) sincos null, r0.x, r0.x mad r0.x, r0.x, l(0.500000), l(0.500000) add r0.x, -r0.x, l(1.000000) mul_sat r0.x, r0.w, r0.x add r0.x, -r0.x, l(1.000000) log r0.x, r0.x mul r0.x, r0.x, cb0[17].x exp r0.x, r0.x mul r0.xyz, r0.xxxx, r1.xyzx min o0.xyz, r0.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000) mov o0.w, l(1.000000) ret // Approximately 53 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] This other pixel shader appeared only at the main menu (66db71004c94e2d0-ps_replace.txt): [code]// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:42:58 2016 cbuffer _Globals : register(b0) { float3 _g_vCamEye : packoffset(c0); float3 _g_vCamFrustumCorner00 : packoffset(c1); float3 _g_vCamFrustumCorner01 : packoffset(c2); float3 _g_vCamFrustumCorner10 : packoffset(c3); float3 _g_vCamFrustumCorner11 : packoffset(c4); float2 _g_vRTResHalfRecip : packoffset(c5); float _g_fFogZMax : packoffset(c6); float _g_fFogHMax : packoffset(c7); float _g_fFogHMin : packoffset(c8); float _g_fFogCamera : packoffset(c9); float _g_fFogTanIn : packoffset(c10); float _g_fFogTanOut : packoffset(c11); float3 _g_vPointLightPos : packoffset(c12); float _g_fPointLightRange : packoffset(c13); float3 _g_vPointLightDiffuseColor : packoffset(c14); } SamplerState _g_sG_DepthPoint_s : register(s0); SamplerState _g_sFogGradientLight_s : register(s1); Texture2D<float4> _TMP110 : register(t0); Texture1D<float4> _TMP111 : register(t1); // 3Dmigoto declarations #define cmp - Texture1D<float4> IniParams : register(t120); Texture2D<float4> StereoParams : register(t125); void main( float4 v0 : SV_Position0, float4 v1 : TEXCOORD0, out float4 o0 : SV_Target0) { float4 r0,r1,r2,r3; uint4 bitmask, uiDest; float4 fDest; r0.xyz = _g_vCamFrustumCorner11.xyz + -_g_vCamFrustumCorner01.xyz; r1.xy = v1.xy / v1.ww; r1.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5); r0.xyz = r1.xxx * r0.xyz + _g_vCamFrustumCorner01.xyz; r2.xyz = _g_vCamFrustumCorner10.xyz + -_g_vCamFrustumCorner00.xyz; r2.xyz = r1.xxx * r2.xyz + _g_vCamFrustumCorner00.xyz; r0.xyz = -r2.xyz + r0.xyz; r0.xyz = r1.yyy * r0.xyz + r2.xyz; r1.xy = _g_vRTResHalfRecip.xy + r1.xy; r0.w = _TMP110.SampleLevel(_g_sG_DepthPoint_s, r1.xy, 0).x; r0.xyz = -_g_vCamEye.xyz + r0.xyz; r1.xyz = r0.www * r0.xyz; r0.w = dot(r1.xyz, r1.xyz); r0.w = rsqrt(r0.w); r1.xyz = r0.www * r1.xyz; r0.w = 1 / r0.w; r2.xyz = -_g_vPointLightPos.xyz + _g_vCamEye.xyz; r1.x = dot(r1.xyz, r2.xyz); r1.y = dot(r2.xyz, r2.xyz); r1.y = -_g_fPointLightRange * _g_fPointLightRange + r1.y; r1.y = 4 * r1.y; r1.z = r1.x + r1.x; r1.y = r1.z * r1.z + -r1.y; r1.z = cmp(r1.y < 0); r1.y = rsqrt(r1.y); r1.y = 1 / r1.y; if (r1.z != 0) discard; r1.z = -r1.x * 2 + r1.y; r1.x = -r1.x * 2 + -r1.y; r1.xy = float2(0.5,0.5) * r1.xz; r1.x = max(0, r1.x); r0.w = min(r1.y, r0.w); r1.y = r0.w + -r1.x; r1.z = cmp(r1.y < 0); if (r1.z != 0) discard; r1.z = dot(r0.xyz, r0.xyz); r1.z = rsqrt(r1.z); r0.xyz = r1.zzz * r0.xyz; r1.xzw = r0.yzx * r1.xxx + _g_vCamEye.yzx; r0.xyz = r0.xyz * r0.www + _g_vCamEye.xyz; r2.xyz = _g_vCamEye.xyz + -r1.wxz; r0.w = dot(r2.xyz, r2.xyz); r0.w = rsqrt(r0.w); r0.w = 1 / r0.w; r0.w = r0.w / _g_fFogZMax; r0.w = _TMP111.SampleLevel(_g_sFogGradientLight_s, r0.w, 0).w; r2.x = -_g_fFogHMin + r1.z; r1.xzw = -_g_vPointLightPos.yzx + r1.xzw; r1.xyzw = r1.xyzw / _g_fPointLightRange; r2.y = -_g_fFogHMin + _g_fFogHMax; r2.x = saturate(r2.x / r2.y); r2.x = max(_g_fFogCamera, r2.x); r2.x = log2(r2.x); r2.x = _g_fFogTanIn * r2.x; r2.x = exp2(r2.x); r2.x = 1 + -r2.x; r2.x = log2(r2.x); r2.x = _g_fFogTanOut * r2.x; r2.x = exp2(r2.x); r2.x = 1 + -r2.x; r2.x = 3.1415 * r2.x; r2.x = cos(r2.x); r2.x = r2.x * 0.5 + 0.5; r2.x = 1 + -r2.x; r0.w = saturate(r2.x * r0.w); r0.w = 1 + -r0.w; r2.x = -_g_fFogHMin + r0.z; r2.x = saturate(r2.x / r2.y); r2.x = max(_g_fFogCamera, r2.x); r2.x = log2(r2.x); r2.x = _g_fFogTanIn * r2.x; r2.x = exp2(r2.x); r2.x = 1 + -r2.x; r2.x = log2(r2.x); r2.x = _g_fFogTanOut * r2.x; r2.x = exp2(r2.x); r2.x = 1 + -r2.x; r2.x = 3.1415 * r2.x; r2.x = cos(r2.x); r2.x = r2.x * 0.5 + 0.5; r2.x = 1 + -r2.x; r2.yzw = _g_vCamEye.xyz + -r0.xyz; r0.xyz = -_g_vPointLightPos.xyz + r0.xyz; r0.xyz = r0.xyz / _g_fPointLightRange; r0.xyz = r0.xyz + -r1.wxz; r2.y = dot(r2.yzw, r2.yzw); r2.y = rsqrt(r2.y); r2.y = 1 / r2.y; r2.y = r2.y / _g_fFogZMax; r2.y = _TMP111.SampleLevel(_g_sFogGradientLight_s, r2.y, 0).w; r2.x = saturate(r2.x * r2.y); r0.w = -r2.x + r0.w; r0.w = 1 + r0.w; r0.w = 0.5 * r0.w; r2.xyz = r0.zxy * r1.xzw; r1.xzw = r0.yzx * r1.zwx + -r2.xyz; r0.x = dot(r0.xyz, r0.xyz); r0.y = dot(r1.xzw, r1.xzw); r0.x = r0.y / r0.x; r0.x = rsqrt(r0.x); r0.x = 1 / r0.x; r0.y = -r0.x * r0.x + 1; r0.x = max(0.00999999978, r0.x); r0.y = rsqrt(r0.y); r0.y = 1 / r0.y; r0.z = r0.y * r0.y; r1.x = r0.z * -r0.y; r1.z = r1.x * r0.z; r1.x = r1.x + r1.x; r1.w = r0.x * r0.x; r0.x = r0.x * r0.x + 3; r2.x = r1.w * 3 + 4; r2.x = r2.x * r1.w; r2.y = r0.y * r0.y + r1.w; r2.y = rsqrt(r2.y); r2.y = 1 / r2.y; r2.z = r2.y + -r0.y; r2.y = r2.y * -r0.y; r2.z = log2(r2.z); r2.z = 0.693147182 * r2.z; r2.z = r2.x * r2.z; r1.y = -r0.y + r1.y; r2.w = r1.y * r1.y + r1.w; r2.w = rsqrt(r2.w); r2.w = 1 / r2.w; r3.x = r2.w + r1.y; r2.w = r2.w * r1.y; r3.x = log2(r3.x); r3.x = 0.693147182 * r3.x; r2.x = r3.x * r2.x; r2.x = 0.5 * r2.x; r2.x = r2.z * 0.5 + -r2.x; r3.xy = float2(5,6) * r1.ww; r1.w = r1.w * r1.w + r3.y; r1.w = 1 + r1.w; r0.z = r0.z * 2 + r3.x; r0.z = 4 + r0.z; r0.z = r2.y * r0.z; r0.z = r0.z * 0.5 + r2.x; r0.z = -r1.z * 0.200000003 + r0.z; r1.x = r1.x * r0.x; r0.z = -r1.x * 0.333333343 + r0.z; r0.y = r0.y * r1.w + r0.z; r0.z = r1.y * r1.y; r1.x = r0.z * 2 + r3.x; r1.x = 4 + r1.x; r1.x = r2.w * r1.x; r0.y = -r1.x * 0.5 + r0.y; r1.x = r0.z * r1.y; r0.z = r1.x * r0.z; r0.x = r1.x * r0.x; r0.y = r0.z * 0.200000003 + r0.y; r0.x = r0.x * 0.666666687 + r0.y; r0.x = r1.y * r1.w + r0.x; r0.x = r0.x * r0.w; o0.xyz = _g_vPointLightDiffuseColor.xyz * r0.xxx; o0.w = 1; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // using 3Dmigoto v1.2.30 on Wed Feb 17 22:42:58 2016 // // // Buffer Definitions: // // cbuffer $Globals // { // // float3 _g_vCamEye; // Offset: 0 Size: 12 // float3 _g_vCamFrustumCorner00; // Offset: 16 Size: 12 // float3 _g_vCamFrustumCorner01; // Offset: 32 Size: 12 // float3 _g_vCamFrustumCorner10; // Offset: 48 Size: 12 // float3 _g_vCamFrustumCorner11; // Offset: 64 Size: 12 // float2 _g_vRTResHalfRecip; // Offset: 80 Size: 8 // float _g_fFogZMax; // Offset: 96 Size: 4 // float _g_fFogHMax; // Offset: 112 Size: 4 // float _g_fFogHMin; // Offset: 128 Size: 4 // float _g_fFogCamera; // Offset: 144 Size: 4 // float _g_fFogTanIn; // Offset: 160 Size: 4 // float _g_fFogTanOut; // Offset: 176 Size: 4 // float3 _g_vPointLightPos; // Offset: 192 Size: 12 // float _g_fPointLightRange; // Offset: 208 Size: 4 // float3 _g_vPointLightDiffuseColor; // Offset: 224 Size: 12 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // _g_sG_DepthPoint sampler NA NA 0 1 // _g_sFogGradientLight sampler NA NA 1 1 // _TMP110 texture float4 2d 0 1 // _TMP111 texture float4 1d 1 1 // $Globals cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float // TEXCOORD 0 xyzw 1 NONE float xy w // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // ps_5_0 dcl_globalFlags refactoringAllowed dcl_constantbuffer cb0[15], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_resource_texture2d (float,float,float,float) t0 dcl_resource_texture1d (float,float,float,float) t1 dcl_input_ps linear v1.xyw dcl_output o0.xyzw dcl_temps 4 add r0.xyz, -cb0[2].xyzx, cb0[4].xyzx div r1.xy, v1.xyxx, v1.wwww mad r1.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000) mad r0.xyz, r1.xxxx, r0.xyzx, cb0[2].xyzx add r2.xyz, -cb0[1].xyzx, cb0[3].xyzx mad r2.xyz, r1.xxxx, r2.xyzx, cb0[1].xyzx add r0.xyz, r0.xyzx, -r2.xyzx mad r0.xyz, r1.yyyy, r0.xyzx, r2.xyzx add r1.xy, r1.xyxx, cb0[5].xyxx sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.yzwx, s0, l(0.000000) add r0.xyz, r0.xyzx, -cb0[0].xyzx mul r1.xyz, r0.xyzx, r0.wwww dp3 r0.w, r1.xyzx, r1.xyzx rsq r0.w, r0.w mul r1.xyz, r1.xyzx, r0.wwww div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w add r2.xyz, cb0[0].xyzx, -cb0[12].xyzx dp3 r1.x, r1.xyzx, r2.xyzx dp3 r1.y, r2.xyzx, r2.xyzx mad r1.y, -cb0[13].x, cb0[13].x, r1.y mul r1.y, r1.y, l(4.000000) add r1.z, r1.x, r1.x mad r1.y, r1.z, r1.z, -r1.y lt r1.z, r1.y, l(0.000000) rsq r1.y, r1.y div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.y discard_nz r1.z mad r1.z, -r1.x, l(2.000000), r1.y mad r1.x, -r1.x, l(2.000000), -r1.y mul r1.xy, r1.xzxx, l(0.500000, 0.500000, 0.000000, 0.000000) max r1.x, r1.x, l(0.000000) min r0.w, r0.w, r1.y add r1.y, -r1.x, r0.w lt r1.z, r1.y, l(0.000000) discard_nz r1.z dp3 r1.z, r0.xyzx, r0.xyzx rsq r1.z, r1.z mul r0.xyz, r0.xyzx, r1.zzzz mad r1.xzw, r0.yyzx, r1.xxxx, cb0[0].yyzx mad r0.xyz, r0.xyzx, r0.wwww, cb0[0].xyzx add r2.xyz, -r1.wxzw, cb0[0].xyzx dp3 r0.w, r2.xyzx, r2.xyzx rsq r0.w, r0.w div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w div r0.w, r0.w, cb0[6].x sample_l_indexable(texture1d)(float,float,float,float) r0.w, r0.w, t1.xyzw, s1, l(0.000000) add r2.x, r1.z, -cb0[8].x add r1.xzw, r1.xxzw, -cb0[12].yyzx div r1.xyzw, r1.xyzw, cb0[13].xxxx add r2.y, cb0[7].x, -cb0[8].x div_sat r2.x, r2.x, r2.y max r2.x, r2.x, cb0[9].x log r2.x, r2.x mul r2.x, r2.x, cb0[10].x exp r2.x, r2.x add r2.x, -r2.x, l(1.000000) log r2.x, r2.x mul r2.x, r2.x, cb0[11].x exp r2.x, r2.x add r2.x, -r2.x, l(1.000000) mul r2.x, r2.x, l(3.141500) sincos null, r2.x, r2.x mad r2.x, r2.x, l(0.500000), l(0.500000) add r2.x, -r2.x, l(1.000000) mul_sat r0.w, r0.w, r2.x add r0.w, -r0.w, l(1.000000) add r2.x, r0.z, -cb0[8].x div_sat r2.x, r2.x, r2.y max r2.x, r2.x, cb0[9].x log r2.x, r2.x mul r2.x, r2.x, cb0[10].x exp r2.x, r2.x add r2.x, -r2.x, l(1.000000) log r2.x, r2.x mul r2.x, r2.x, cb0[11].x exp r2.x, r2.x add r2.x, -r2.x, l(1.000000) mul r2.x, r2.x, l(3.141500) sincos null, r2.x, r2.x mad r2.x, r2.x, l(0.500000), l(0.500000) add r2.x, -r2.x, l(1.000000) add r2.yzw, -r0.xxyz, cb0[0].xxyz add r0.xyz, r0.xyzx, -cb0[12].xyzx div r0.xyz, r0.xyzx, cb0[13].xxxx add r0.xyz, -r1.wxzw, r0.xyzx dp3 r2.y, r2.yzwy, r2.yzwy rsq r2.y, r2.y div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y div r2.y, r2.y, cb0[6].x sample_l_indexable(texture1d)(float,float,float,float) r2.y, r2.y, t1.xwyz, s1, l(0.000000) mul_sat r2.x, r2.y, r2.x add r0.w, r0.w, -r2.x add r0.w, r0.w, l(1.000000) mul r0.w, r0.w, l(0.500000) mul r2.xyz, r1.xzwx, r0.zxyz mad r1.xzw, r0.yyzx, r1.zzwx, -r2.xxyz dp3 r0.x, r0.xyzx, r0.xyzx dp3 r0.y, r1.xzwx, r1.xzwx div r0.x, r0.y, r0.x rsq r0.x, r0.x div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x mad r0.y, -r0.x, r0.x, l(1.000000) max r0.x, r0.x, l(0.010000) rsq r0.y, r0.y div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y mul r0.z, r0.y, r0.y mul r1.x, -r0.y, r0.z mul r1.z, r0.z, r1.x add r1.x, r1.x, r1.x mul r1.w, r0.x, r0.x mad r0.x, r0.x, r0.x, l(3.000000) mad r2.x, r1.w, l(3.000000), l(4.000000) mul r2.x, r1.w, r2.x mad r2.y, r0.y, r0.y, r1.w rsq r2.y, r2.y div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y add r2.z, -r0.y, r2.y mul r2.y, -r0.y, r2.y log r2.z, r2.z mul r2.z, r2.z, l(0.693147182) mul r2.z, r2.z, r2.x add r1.y, r1.y, -r0.y mad r2.w, r1.y, r1.y, r1.w rsq r2.w, r2.w div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w add r3.x, r1.y, r2.w mul r2.w, r1.y, r2.w log r3.x, r3.x mul r3.x, r3.x, l(0.693147182) mul r2.x, r2.x, r3.x mul r2.x, r2.x, l(0.500000) mad r2.x, r2.z, l(0.500000), -r2.x mul r3.xy, r1.wwww, l(5.000000, 6.000000, 0.000000, 0.000000) mad r1.w, r1.w, r1.w, r3.y add r1.w, r1.w, l(1.000000) mad r0.z, r0.z, l(2.000000), r3.x add r0.z, r0.z, l(4.000000) mul r0.z, r0.z, r2.y mad r0.z, r0.z, l(0.500000), r2.x mad r0.z, -r1.z, l(0.200000), r0.z mul r1.x, r0.x, r1.x mad r0.z, -r1.x, l(0.333333343), r0.z mad r0.y, r0.y, r1.w, r0.z mul r0.z, r1.y, r1.y mad r1.x, r0.z, l(2.000000), r3.x add r1.x, r1.x, l(4.000000) mul r1.x, r1.x, r2.w mad r0.y, -r1.x, l(0.500000), r0.y mul r1.x, r1.y, r0.z mul r0.z, r0.z, r1.x mul r0.x, r0.x, r1.x mad r0.y, r0.z, l(0.200000), r0.y mad r0.x, r0.x, l(0.666666687), r0.y mad r0.x, r1.y, r1.w, r0.x mul r0.x, r0.w, r0.x mul o0.xyz, r0.xxxx, cb0[14].xyzx mov o0.w, l(1.000000) ret // Approximately 158 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] In the vertex shader I tried things like copying the same r0 and r1 operations to new variables, to apply fixes only to the position or the texcoord. I haven't tried many things with the pixel shader yet, but I don't have any more good ideas. I may post this in the "bo3b school for shaderhackers" thread too, if this gets little attention.
While I was doing the fix for Shadow Complex (which is almost complete), I got frustrated because I need 12 key cards to reach the fusion helmet (I want to clear all the map just in case) and switched for a while to Van Helsing Final Cut.

Having to delete the Steam overlay renderer every time I started Steam was annoying, and I was getting better frame pacing in DX11, so I started fixing the game in DX11. Comparing it to the DX9 fix, I have fixed a pair of effects that aren't fixed in the DX9 version (the water in the barrel near the smith in Markovna, and the balls in the teleporter with the high shaders option disabled).

I have some questions for the fixer/fixers of the DX9 version:

1- How far into the game did you have to be to see all broken shaders? I finished the first game 2 years ago and took me 30 hours. This is 3 games in 1. I'll have to spend points in different spells to see all kind of effects I can.

2- For now I have fixed around 20 shaders, but there is only one giving me problems: the lighting the main character casts into the ground, which is also for spells lighting, some other lights, etc. The problem seemed simple at first. Haloing, like many other shaders. But in this one, applying the typical fix to the texcoord moved the effect to screen depth, fixing haloing but breaking the position, which was OK before the fix.

Look at the blur lighting of the attack and the light on the ground under the character. Ignore the HUD, I was skipping one of the shaders so I could take the screenshots when pausing the game.

Haloing but good position (I was golding F9 here, so you'll see other shaders unfixed):
Image

Haloing fixed but screen depth position:
Image

If someone with good 3Dmigoto knowledge know how to fix it, here is the untouched vertex shader (7bd5ccb9980f40e0-vs_replace.txt):

// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:41:28 2016

cbuffer _Globals : register(b0)
{
row_major float4x4 _g_matVP : packoffset(c0);
row_major float4x4 _g_matWorld : packoffset(c4);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : POSITION0,
out float4 o0 : SV_Position0,
out float4 o1 : TEXCOORD0)
{
float4 r0,r1;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyzw = _g_matWorld._m10_m11_m12_m13 * v0.yyyy;
r0.xyzw = v0.xxxx * _g_matWorld._m00_m01_m02_m03 + r0.xyzw;
r0.xyzw = v0.zzzz * _g_matWorld._m20_m21_m22_m23 + r0.xyzw;
r0.xyzw = v0.wwww * _g_matWorld._m30_m31_m32_m33 + r0.xyzw;
r1.xyzw = _g_matVP._m10_m11_m12_m13 * r0.yyyy;
r1.xyzw = r0.xxxx * _g_matVP._m00_m01_m02_m03 + r1.xyzw;
r1.xyzw = r0.zzzz * _g_matVP._m20_m21_m22_m23 + r1.xyzw;
r0.xyzw = r0.wwww * _g_matVP._m30_m31_m32_m33 + r1.xyzw;
o0.xyzw = r0.xyzw;
o1.xyzw = r0.xyzw;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.30 on Wed Feb 17 22:41:28 2016
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// row_major float4x4 _g_matVP; // Offset: 0 Size: 64
// row_major float4x4 _g_matWorld; // Offset: 64 Size: 64
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyzw 0 NONE float xyzw
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xyzw 1 NONE float xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[8], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb0[5].xyzw
mad r0.xyzw, v0.xxxx, cb0[4].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[6].xyzw, r0.xyzw
mad r0.xyzw, v0.wwww, cb0[7].xyzw, r0.xyzw
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r1.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
mad r0.xyzw, r0.wwww, cb0[3].xyzw, r1.xyzw
mov o0.xyzw, r0.xyzw
mov o1.xyzw, r0.xyzw
ret
// Approximately 11 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


Both "o0.x-=separation*(o0.w-convergence);" and "o1.x+=separation*(o1.x-convergence);" (only one of those) makes the effect be at screen depth. With both applied, they nullify each other.

This is the pixel shader (5c6fca88699c090a-ps_replace.txt):

// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:41:55 2016

cbuffer _Globals : register(b0)
{
float3 _g_vCamEye : packoffset(c0);
float _g_fCamFar : packoffset(c1);
float3 _g_vCamFrustumCorner00 : packoffset(c2);
float3 _g_vCamFrustumCorner01 : packoffset(c3);
float3 _g_vCamFrustumCorner10 : packoffset(c4);
float3 _g_vCamFrustumCorner11 : packoffset(c5);
float2 _g_vRTResHalfRecip : packoffset(c6);
float _g_fFogZMax : packoffset(c7);
float _g_fFogHMax : packoffset(c8);
float _g_fFogHMin : packoffset(c9);
float _g_fFogCamera : packoffset(c10);
float _g_fFogTanIn : packoffset(c11);
float _g_fFogTanOut : packoffset(c12);
float3 _g_vPointLightPos : packoffset(c13);
float _g_fPointLightRange : packoffset(c14);
float _g_fPointLightAttenuation : packoffset(c15);
float3 _g_vPointLightDiffuseColor : packoffset(c16);
float _g_fPointLightFogPower : packoffset(c17);
}

SamplerState _g_sG_DepthPoint_s : register(s0);
SamplerState _g_sFogGradientLight_s : register(s1);
Texture2D<float4> _TMP51 : register(t0);
Texture1D<float4> _TMP52 : register(t1);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


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

r0.xyz = _g_vCamFrustumCorner11.xyz + -_g_vCamFrustumCorner01.xyz;
r1.xy = v1.xy / v1.ww;
r1.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5);
r0.xyz = r1.xxx * r0.xyz + _g_vCamFrustumCorner01.xyz;
r2.xyz = _g_vCamFrustumCorner10.xyz + -_g_vCamFrustumCorner00.xyz;
r2.xyz = r1.xxx * r2.xyz + _g_vCamFrustumCorner00.xyz;
r0.xyz = -r2.xyz + r0.xyz;
r0.xyz = r1.yyy * r0.xyz + r2.xyz;
r1.xy = _g_vRTResHalfRecip.xy + r1.xy;
r0.w = _TMP51.SampleLevel(_g_sG_DepthPoint_s, r1.xy, 0).x;
r0.xyz = -_g_vCamEye.xyz + r0.xyz;
r0.xyz = r0.www * r0.xyz + _g_vCamEye.xyz;
r0.w = _g_fCamFar * r0.w;
r0.w = r0.w / _g_fFogZMax;
r0.w = _TMP52.SampleLevel(_g_sFogGradientLight_s, r0.w, 0).w;
r1.xyz = -_g_vPointLightPos.xyz + r0.xyz;
r0.x = -_g_fFogHMin + r0.z;
r0.y = dot(r1.xyz, r1.xyz);
r0.y = rsqrt(r0.y);
r0.y = 1 / r0.y;
r0.y = saturate(r0.y / _g_fPointLightRange);
r0.y = 1 + -r0.y;
r0.z = r0.y * r0.y + -9.99999997e-007;
r0.y = log2(r0.y);
r0.y = _g_fPointLightAttenuation * r0.y;
r0.y = exp2(r0.y);
r1.xyz = _g_vPointLightDiffuseColor.xyz * r0.yyy;
r0.y = cmp(r0.z < 0);
if (r0.y != 0) discard;
r0.y = -_g_fFogHMin + _g_fFogHMax;
r0.x = saturate(r0.x / r0.y);
r0.x = max(_g_fFogCamera, r0.x);
r0.x = log2(r0.x);
r0.x = _g_fFogTanIn * r0.x;
r0.x = exp2(r0.x);
r0.x = 1 + -r0.x;
r0.x = log2(r0.x);
r0.x = _g_fFogTanOut * r0.x;
r0.x = exp2(r0.x);
r0.x = 1 + -r0.x;
r0.x = 3.1415 * r0.x;
r0.x = cos(r0.x);
r0.x = r0.x * 0.5 + 0.5;
r0.x = 1 + -r0.x;
r0.x = saturate(r0.x * r0.w);
r0.x = 1 + -r0.x;
r0.x = log2(r0.x);
r0.x = _g_fPointLightFogPower * r0.x;
r0.x = exp2(r0.x);
r0.xyz = r1.xyz * r0.xxx;
o0.xyz = min(float3(10,10,10), r0.xyz);
o0.w = 1;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.30 on Wed Feb 17 22:41:55 2016
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float3 _g_vCamEye; // Offset: 0 Size: 12
// float _g_fCamFar; // Offset: 16 Size: 4
// float3 _g_vCamFrustumCorner00; // Offset: 32 Size: 12
// float3 _g_vCamFrustumCorner01; // Offset: 48 Size: 12
// float3 _g_vCamFrustumCorner10; // Offset: 64 Size: 12
// float3 _g_vCamFrustumCorner11; // Offset: 80 Size: 12
// float2 _g_vRTResHalfRecip; // Offset: 96 Size: 8
// float _g_fFogZMax; // Offset: 112 Size: 4
// float _g_fFogHMax; // Offset: 128 Size: 4
// float _g_fFogHMin; // Offset: 144 Size: 4
// float _g_fFogCamera; // Offset: 160 Size: 4
// float _g_fFogTanIn; // Offset: 176 Size: 4
// float _g_fFogTanOut; // Offset: 192 Size: 4
// float3 _g_vPointLightPos; // Offset: 208 Size: 12
// float _g_fPointLightRange; // Offset: 224 Size: 4
// float _g_fPointLightAttenuation; // Offset: 240 Size: 4
// float3 _g_vPointLightDiffuseColor; // Offset: 256 Size: 12
// float _g_fPointLightFogPower; // Offset: 272 Size: 4
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _g_sG_DepthPoint sampler NA NA 0 1
// _g_sFogGradientLight sampler NA NA 1 1
// _TMP51 texture float4 2d 0 1
// _TMP52 texture float4 1d 1 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 xyzw 1 NONE float xy w
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[18], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture1d (float,float,float,float) t1
dcl_input_ps linear v1.xyw
dcl_output o0.xyzw
dcl_temps 3
add r0.xyz, -cb0[3].xyzx, cb0[5].xyzx
div r1.xy, v1.xyxx, v1.wwww
mad r1.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r0.xyz, r1.xxxx, r0.xyzx, cb0[3].xyzx
add r2.xyz, -cb0[2].xyzx, cb0[4].xyzx
mad r2.xyz, r1.xxxx, r2.xyzx, cb0[2].xyzx
add r0.xyz, r0.xyzx, -r2.xyzx
mad r0.xyz, r1.yyyy, r0.xyzx, r2.xyzx
add r1.xy, r1.xyxx, cb0[6].xyxx
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.yzwx, s0, l(0.000000)
add r0.xyz, r0.xyzx, -cb0[0].xyzx
mad r0.xyz, r0.wwww, r0.xyzx, cb0[0].xyzx
mul r0.w, r0.w, cb0[1].x
div r0.w, r0.w, cb0[7].x
sample_l_indexable(texture1d)(float,float,float,float) r0.w, r0.w, t1.xyzw, s1, l(0.000000)
add r1.xyz, r0.xyzx, -cb0[13].xyzx
add r0.x, r0.z, -cb0[9].x
dp3 r0.y, r1.xyzx, r1.xyzx
rsq r0.y, r0.y
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
div_sat r0.y, r0.y, cb0[14].x
add r0.y, -r0.y, l(1.000000)
mad r0.z, r0.y, r0.y, l(-0.000001)
log r0.y, r0.y
mul r0.y, r0.y, cb0[15].x
exp r0.y, r0.y
mul r1.xyz, r0.yyyy, cb0[16].xyzx
lt r0.y, r0.z, l(0.000000)
discard_nz r0.y
add r0.y, cb0[8].x, -cb0[9].x
div_sat r0.x, r0.x, r0.y
max r0.x, r0.x, cb0[10].x
log r0.x, r0.x
mul r0.x, r0.x, cb0[11].x
exp r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
log r0.x, r0.x
mul r0.x, r0.x, cb0[12].x
exp r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
mul r0.x, r0.x, l(3.141500)
sincos null, r0.x, r0.x
mad r0.x, r0.x, l(0.500000), l(0.500000)
add r0.x, -r0.x, l(1.000000)
mul_sat r0.x, r0.w, r0.x
add r0.x, -r0.x, l(1.000000)
log r0.x, r0.x
mul r0.x, r0.x, cb0[17].x
exp r0.x, r0.x
mul r0.xyz, r0.xxxx, r1.xyzx
min o0.xyz, r0.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000)
mov o0.w, l(1.000000)
ret
// Approximately 53 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


This other pixel shader appeared only at the main menu (66db71004c94e2d0-ps_replace.txt):

// ---- Created with 3Dmigoto v1.2.30 on Wed Feb 17 22:42:58 2016

cbuffer _Globals : register(b0)
{
float3 _g_vCamEye : packoffset(c0);
float3 _g_vCamFrustumCorner00 : packoffset(c1);
float3 _g_vCamFrustumCorner01 : packoffset(c2);
float3 _g_vCamFrustumCorner10 : packoffset(c3);
float3 _g_vCamFrustumCorner11 : packoffset(c4);
float2 _g_vRTResHalfRecip : packoffset(c5);
float _g_fFogZMax : packoffset(c6);
float _g_fFogHMax : packoffset(c7);
float _g_fFogHMin : packoffset(c8);
float _g_fFogCamera : packoffset(c9);
float _g_fFogTanIn : packoffset(c10);
float _g_fFogTanOut : packoffset(c11);
float3 _g_vPointLightPos : packoffset(c12);
float _g_fPointLightRange : packoffset(c13);
float3 _g_vPointLightDiffuseColor : packoffset(c14);
}

SamplerState _g_sG_DepthPoint_s : register(s0);
SamplerState _g_sFogGradientLight_s : register(s1);
Texture2D<float4> _TMP110 : register(t0);
Texture1D<float4> _TMP111 : register(t1);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
float4 v0 : SV_Position0,
float4 v1 : TEXCOORD0,
out float4 o0 : SV_Target0)
{
float4 r0,r1,r2,r3;
uint4 bitmask, uiDest;
float4 fDest;

r0.xyz = _g_vCamFrustumCorner11.xyz + -_g_vCamFrustumCorner01.xyz;
r1.xy = v1.xy / v1.ww;
r1.xy = r1.xy * float2(0.5,-0.5) + float2(0.5,0.5);
r0.xyz = r1.xxx * r0.xyz + _g_vCamFrustumCorner01.xyz;
r2.xyz = _g_vCamFrustumCorner10.xyz + -_g_vCamFrustumCorner00.xyz;
r2.xyz = r1.xxx * r2.xyz + _g_vCamFrustumCorner00.xyz;
r0.xyz = -r2.xyz + r0.xyz;
r0.xyz = r1.yyy * r0.xyz + r2.xyz;
r1.xy = _g_vRTResHalfRecip.xy + r1.xy;
r0.w = _TMP110.SampleLevel(_g_sG_DepthPoint_s, r1.xy, 0).x;
r0.xyz = -_g_vCamEye.xyz + r0.xyz;
r1.xyz = r0.www * r0.xyz;
r0.w = dot(r1.xyz, r1.xyz);
r0.w = rsqrt(r0.w);
r1.xyz = r0.www * r1.xyz;
r0.w = 1 / r0.w;
r2.xyz = -_g_vPointLightPos.xyz + _g_vCamEye.xyz;
r1.x = dot(r1.xyz, r2.xyz);
r1.y = dot(r2.xyz, r2.xyz);
r1.y = -_g_fPointLightRange * _g_fPointLightRange + r1.y;
r1.y = 4 * r1.y;
r1.z = r1.x + r1.x;
r1.y = r1.z * r1.z + -r1.y;
r1.z = cmp(r1.y < 0);
r1.y = rsqrt(r1.y);
r1.y = 1 / r1.y;
if (r1.z != 0) discard;
r1.z = -r1.x * 2 + r1.y;
r1.x = -r1.x * 2 + -r1.y;
r1.xy = float2(0.5,0.5) * r1.xz;
r1.x = max(0, r1.x);
r0.w = min(r1.y, r0.w);
r1.y = r0.w + -r1.x;
r1.z = cmp(r1.y < 0);
if (r1.z != 0) discard;
r1.z = dot(r0.xyz, r0.xyz);
r1.z = rsqrt(r1.z);
r0.xyz = r1.zzz * r0.xyz;
r1.xzw = r0.yzx * r1.xxx + _g_vCamEye.yzx;
r0.xyz = r0.xyz * r0.www + _g_vCamEye.xyz;
r2.xyz = _g_vCamEye.xyz + -r1.wxz;
r0.w = dot(r2.xyz, r2.xyz);
r0.w = rsqrt(r0.w);
r0.w = 1 / r0.w;
r0.w = r0.w / _g_fFogZMax;
r0.w = _TMP111.SampleLevel(_g_sFogGradientLight_s, r0.w, 0).w;
r2.x = -_g_fFogHMin + r1.z;
r1.xzw = -_g_vPointLightPos.yzx + r1.xzw;
r1.xyzw = r1.xyzw / _g_fPointLightRange;
r2.y = -_g_fFogHMin + _g_fFogHMax;
r2.x = saturate(r2.x / r2.y);
r2.x = max(_g_fFogCamera, r2.x);
r2.x = log2(r2.x);
r2.x = _g_fFogTanIn * r2.x;
r2.x = exp2(r2.x);
r2.x = 1 + -r2.x;
r2.x = log2(r2.x);
r2.x = _g_fFogTanOut * r2.x;
r2.x = exp2(r2.x);
r2.x = 1 + -r2.x;
r2.x = 3.1415 * r2.x;
r2.x = cos(r2.x);
r2.x = r2.x * 0.5 + 0.5;
r2.x = 1 + -r2.x;
r0.w = saturate(r2.x * r0.w);
r0.w = 1 + -r0.w;
r2.x = -_g_fFogHMin + r0.z;
r2.x = saturate(r2.x / r2.y);
r2.x = max(_g_fFogCamera, r2.x);
r2.x = log2(r2.x);
r2.x = _g_fFogTanIn * r2.x;
r2.x = exp2(r2.x);
r2.x = 1 + -r2.x;
r2.x = log2(r2.x);
r2.x = _g_fFogTanOut * r2.x;
r2.x = exp2(r2.x);
r2.x = 1 + -r2.x;
r2.x = 3.1415 * r2.x;
r2.x = cos(r2.x);
r2.x = r2.x * 0.5 + 0.5;
r2.x = 1 + -r2.x;
r2.yzw = _g_vCamEye.xyz + -r0.xyz;
r0.xyz = -_g_vPointLightPos.xyz + r0.xyz;
r0.xyz = r0.xyz / _g_fPointLightRange;
r0.xyz = r0.xyz + -r1.wxz;
r2.y = dot(r2.yzw, r2.yzw);
r2.y = rsqrt(r2.y);
r2.y = 1 / r2.y;
r2.y = r2.y / _g_fFogZMax;
r2.y = _TMP111.SampleLevel(_g_sFogGradientLight_s, r2.y, 0).w;
r2.x = saturate(r2.x * r2.y);
r0.w = -r2.x + r0.w;
r0.w = 1 + r0.w;
r0.w = 0.5 * r0.w;
r2.xyz = r0.zxy * r1.xzw;
r1.xzw = r0.yzx * r1.zwx + -r2.xyz;
r0.x = dot(r0.xyz, r0.xyz);
r0.y = dot(r1.xzw, r1.xzw);
r0.x = r0.y / r0.x;
r0.x = rsqrt(r0.x);
r0.x = 1 / r0.x;
r0.y = -r0.x * r0.x + 1;
r0.x = max(0.00999999978, r0.x);
r0.y = rsqrt(r0.y);
r0.y = 1 / r0.y;
r0.z = r0.y * r0.y;
r1.x = r0.z * -r0.y;
r1.z = r1.x * r0.z;
r1.x = r1.x + r1.x;
r1.w = r0.x * r0.x;
r0.x = r0.x * r0.x + 3;
r2.x = r1.w * 3 + 4;
r2.x = r2.x * r1.w;
r2.y = r0.y * r0.y + r1.w;
r2.y = rsqrt(r2.y);
r2.y = 1 / r2.y;
r2.z = r2.y + -r0.y;
r2.y = r2.y * -r0.y;
r2.z = log2(r2.z);
r2.z = 0.693147182 * r2.z;
r2.z = r2.x * r2.z;
r1.y = -r0.y + r1.y;
r2.w = r1.y * r1.y + r1.w;
r2.w = rsqrt(r2.w);
r2.w = 1 / r2.w;
r3.x = r2.w + r1.y;
r2.w = r2.w * r1.y;
r3.x = log2(r3.x);
r3.x = 0.693147182 * r3.x;
r2.x = r3.x * r2.x;
r2.x = 0.5 * r2.x;
r2.x = r2.z * 0.5 + -r2.x;
r3.xy = float2(5,6) * r1.ww;
r1.w = r1.w * r1.w + r3.y;
r1.w = 1 + r1.w;
r0.z = r0.z * 2 + r3.x;
r0.z = 4 + r0.z;
r0.z = r2.y * r0.z;
r0.z = r0.z * 0.5 + r2.x;
r0.z = -r1.z * 0.200000003 + r0.z;
r1.x = r1.x * r0.x;
r0.z = -r1.x * 0.333333343 + r0.z;
r0.y = r0.y * r1.w + r0.z;
r0.z = r1.y * r1.y;
r1.x = r0.z * 2 + r3.x;
r1.x = 4 + r1.x;
r1.x = r2.w * r1.x;
r0.y = -r1.x * 0.5 + r0.y;
r1.x = r0.z * r1.y;
r0.z = r1.x * r0.z;
r0.x = r1.x * r0.x;
r0.y = r0.z * 0.200000003 + r0.y;
r0.x = r0.x * 0.666666687 + r0.y;
r0.x = r1.y * r1.w + r0.x;
r0.x = r0.x * r0.w;
o0.xyz = _g_vPointLightDiffuseColor.xyz * r0.xxx;
o0.w = 1;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// using 3Dmigoto v1.2.30 on Wed Feb 17 22:42:58 2016
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
// float3 _g_vCamEye; // Offset: 0 Size: 12
// float3 _g_vCamFrustumCorner00; // Offset: 16 Size: 12
// float3 _g_vCamFrustumCorner01; // Offset: 32 Size: 12
// float3 _g_vCamFrustumCorner10; // Offset: 48 Size: 12
// float3 _g_vCamFrustumCorner11; // Offset: 64 Size: 12
// float2 _g_vRTResHalfRecip; // Offset: 80 Size: 8
// float _g_fFogZMax; // Offset: 96 Size: 4
// float _g_fFogHMax; // Offset: 112 Size: 4
// float _g_fFogHMin; // Offset: 128 Size: 4
// float _g_fFogCamera; // Offset: 144 Size: 4
// float _g_fFogTanIn; // Offset: 160 Size: 4
// float _g_fFogTanOut; // Offset: 176 Size: 4
// float3 _g_vPointLightPos; // Offset: 192 Size: 12
// float _g_fPointLightRange; // Offset: 208 Size: 4
// float3 _g_vPointLightDiffuseColor; // Offset: 224 Size: 12
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _g_sG_DepthPoint sampler NA NA 0 1
// _g_sFogGradientLight sampler NA NA 1 1
// _TMP110 texture float4 2d 0 1
// _TMP111 texture float4 1d 1 1
// $Globals cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 xyzw 1 NONE float xy w
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[15], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture1d (float,float,float,float) t1
dcl_input_ps linear v1.xyw
dcl_output o0.xyzw
dcl_temps 4
add r0.xyz, -cb0[2].xyzx, cb0[4].xyzx
div r1.xy, v1.xyxx, v1.wwww
mad r1.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r0.xyz, r1.xxxx, r0.xyzx, cb0[2].xyzx
add r2.xyz, -cb0[1].xyzx, cb0[3].xyzx
mad r2.xyz, r1.xxxx, r2.xyzx, cb0[1].xyzx
add r0.xyz, r0.xyzx, -r2.xyzx
mad r0.xyz, r1.yyyy, r0.xyzx, r2.xyzx
add r1.xy, r1.xyxx, cb0[5].xyxx
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t0.yzwx, s0, l(0.000000)
add r0.xyz, r0.xyzx, -cb0[0].xyzx
mul r1.xyz, r0.xyzx, r0.wwww
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r1.xyzx, r0.wwww
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
add r2.xyz, cb0[0].xyzx, -cb0[12].xyzx
dp3 r1.x, r1.xyzx, r2.xyzx
dp3 r1.y, r2.xyzx, r2.xyzx
mad r1.y, -cb0[13].x, cb0[13].x, r1.y
mul r1.y, r1.y, l(4.000000)
add r1.z, r1.x, r1.x
mad r1.y, r1.z, r1.z, -r1.y
lt r1.z, r1.y, l(0.000000)
rsq r1.y, r1.y
div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.y
discard_nz r1.z
mad r1.z, -r1.x, l(2.000000), r1.y
mad r1.x, -r1.x, l(2.000000), -r1.y
mul r1.xy, r1.xzxx, l(0.500000, 0.500000, 0.000000, 0.000000)
max r1.x, r1.x, l(0.000000)
min r0.w, r0.w, r1.y
add r1.y, -r1.x, r0.w
lt r1.z, r1.y, l(0.000000)
discard_nz r1.z
dp3 r1.z, r0.xyzx, r0.xyzx
rsq r1.z, r1.z
mul r0.xyz, r0.xyzx, r1.zzzz
mad r1.xzw, r0.yyzx, r1.xxxx, cb0[0].yyzx
mad r0.xyz, r0.xyzx, r0.wwww, cb0[0].xyzx
add r2.xyz, -r1.wxzw, cb0[0].xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
div r0.w, r0.w, cb0[6].x
sample_l_indexable(texture1d)(float,float,float,float) r0.w, r0.w, t1.xyzw, s1, l(0.000000)
add r2.x, r1.z, -cb0[8].x
add r1.xzw, r1.xxzw, -cb0[12].yyzx
div r1.xyzw, r1.xyzw, cb0[13].xxxx
add r2.y, cb0[7].x, -cb0[8].x
div_sat r2.x, r2.x, r2.y
max r2.x, r2.x, cb0[9].x
log r2.x, r2.x
mul r2.x, r2.x, cb0[10].x
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
log r2.x, r2.x
mul r2.x, r2.x, cb0[11].x
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
mul r2.x, r2.x, l(3.141500)
sincos null, r2.x, r2.x
mad r2.x, r2.x, l(0.500000), l(0.500000)
add r2.x, -r2.x, l(1.000000)
mul_sat r0.w, r0.w, r2.x
add r0.w, -r0.w, l(1.000000)
add r2.x, r0.z, -cb0[8].x
div_sat r2.x, r2.x, r2.y
max r2.x, r2.x, cb0[9].x
log r2.x, r2.x
mul r2.x, r2.x, cb0[10].x
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
log r2.x, r2.x
mul r2.x, r2.x, cb0[11].x
exp r2.x, r2.x
add r2.x, -r2.x, l(1.000000)
mul r2.x, r2.x, l(3.141500)
sincos null, r2.x, r2.x
mad r2.x, r2.x, l(0.500000), l(0.500000)
add r2.x, -r2.x, l(1.000000)
add r2.yzw, -r0.xxyz, cb0[0].xxyz
add r0.xyz, r0.xyzx, -cb0[12].xyzx
div r0.xyz, r0.xyzx, cb0[13].xxxx
add r0.xyz, -r1.wxzw, r0.xyzx
dp3 r2.y, r2.yzwy, r2.yzwy
rsq r2.y, r2.y
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
div r2.y, r2.y, cb0[6].x
sample_l_indexable(texture1d)(float,float,float,float) r2.y, r2.y, t1.xwyz, s1, l(0.000000)
mul_sat r2.x, r2.y, r2.x
add r0.w, r0.w, -r2.x
add r0.w, r0.w, l(1.000000)
mul r0.w, r0.w, l(0.500000)
mul r2.xyz, r1.xzwx, r0.zxyz
mad r1.xzw, r0.yyzx, r1.zzwx, -r2.xxyz
dp3 r0.x, r0.xyzx, r0.xyzx
dp3 r0.y, r1.xzwx, r1.xzwx
div r0.x, r0.y, r0.x
rsq r0.x, r0.x
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mad r0.y, -r0.x, r0.x, l(1.000000)
max r0.x, r0.x, l(0.010000)
rsq r0.y, r0.y
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
mul r0.z, r0.y, r0.y
mul r1.x, -r0.y, r0.z
mul r1.z, r0.z, r1.x
add r1.x, r1.x, r1.x
mul r1.w, r0.x, r0.x
mad r0.x, r0.x, r0.x, l(3.000000)
mad r2.x, r1.w, l(3.000000), l(4.000000)
mul r2.x, r1.w, r2.x
mad r2.y, r0.y, r0.y, r1.w
rsq r2.y, r2.y
div r2.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.y
add r2.z, -r0.y, r2.y
mul r2.y, -r0.y, r2.y
log r2.z, r2.z
mul r2.z, r2.z, l(0.693147182)
mul r2.z, r2.z, r2.x
add r1.y, r1.y, -r0.y
mad r2.w, r1.y, r1.y, r1.w
rsq r2.w, r2.w
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
add r3.x, r1.y, r2.w
mul r2.w, r1.y, r2.w
log r3.x, r3.x
mul r3.x, r3.x, l(0.693147182)
mul r2.x, r2.x, r3.x
mul r2.x, r2.x, l(0.500000)
mad r2.x, r2.z, l(0.500000), -r2.x
mul r3.xy, r1.wwww, l(5.000000, 6.000000, 0.000000, 0.000000)
mad r1.w, r1.w, r1.w, r3.y
add r1.w, r1.w, l(1.000000)
mad r0.z, r0.z, l(2.000000), r3.x
add r0.z, r0.z, l(4.000000)
mul r0.z, r0.z, r2.y
mad r0.z, r0.z, l(0.500000), r2.x
mad r0.z, -r1.z, l(0.200000), r0.z
mul r1.x, r0.x, r1.x
mad r0.z, -r1.x, l(0.333333343), r0.z
mad r0.y, r0.y, r1.w, r0.z
mul r0.z, r1.y, r1.y
mad r1.x, r0.z, l(2.000000), r3.x
add r1.x, r1.x, l(4.000000)
mul r1.x, r1.x, r2.w
mad r0.y, -r1.x, l(0.500000), r0.y
mul r1.x, r1.y, r0.z
mul r0.z, r0.z, r1.x
mul r0.x, r0.x, r1.x
mad r0.y, r0.z, l(0.200000), r0.y
mad r0.x, r0.x, l(0.666666687), r0.y
mad r0.x, r1.y, r1.w, r0.x
mul r0.x, r0.w, r0.x
mul o0.xyz, r0.xxxx, cb0[14].xyzx
mov o0.w, l(1.000000)
ret
// Approximately 158 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


In the vertex shader I tried things like copying the same r0 and r1 operations to new variables, to apply fixes only to the position or the texcoord. I haven't tried many things with the pixel shader yet, but I don't have any more good ideas.

I may post this in the "bo3b school for shaderhackers" thread too, if this gets little attention.

CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: Gainward Phoenix 1080 GLH
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com

#43
Posted 02/17/2016 11:05 PM   
4everAwake did all the fixing in this game - you definitely should ask him about it. I can`t find the other topic where we talked about it.
4everAwake did all the fixing in this game - you definitely should ask him about it.

I can`t find the other topic where we talked about it.
[quote="masterotaku"]2- For now I have fixed around 20 shaders, but there is only one giving me problems: the lighting the main character casts into the ground, which is also for spells lighting, some other lights, etc. The problem seemed simple at first. Haloing, like many other shaders. But in this one, applying the typical fix to the texcoord moved the effect to screen depth, fixing haloing but breaking the position, which was OK before the fix.[/quote]Sounds fairly typical for a light - the halo fix in the vertex shader will only be one part of the fix, and moving it back to screen depth is expected outcome for that alone. Next you need to fix it in the pixel shader - studying the original DX9 fix would be worthwhile here.
masterotaku said:2- For now I have fixed around 20 shaders, but there is only one giving me problems: the lighting the main character casts into the ground, which is also for spells lighting, some other lights, etc. The problem seemed simple at first. Haloing, like many other shaders. But in this one, applying the typical fix to the texcoord moved the effect to screen depth, fixing haloing but breaking the position, which was OK before the fix.
Sounds fairly typical for a light - the halo fix in the vertex shader will only be one part of the fix, and moving it back to screen depth is expected outcome for that alone. Next you need to fix it in the pixel shader - studying the original DX9 fix would be worthwhile here.

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

#45
Posted 03/01/2016 01:26 AM   
  3 / 3    
Scroll To Top