How to fix/disable shaders in games(DLL,guide and fixes).
  131 / 167    
Well anywho, if you want to try what I really think is the solution, its a bit time consuming depeninding on how many shaders there are . get newest debugger. dumpall = true start game all the way up. Exit Grab mana84's reconvert tool from tools section. Convert them all [Then you need to double check. it often adds . at the end of an output] add to vertexshader folder. Start game. ALT TAB. Then like 10 at at a time remove everything below output lines. Save. Then alt tab back into game and click F10. till you find it. It was a lot less fun without reconvert tool....let me tell you.
Well anywho, if you want to try what I really think is the solution, its a bit time consuming depeninding on how many shaders there are .

get newest debugger.
dumpall = true
start game all the way up. Exit
Grab mana84's reconvert tool from tools section.
Convert them all [Then you need to double check. it often adds . at the end of an output]
add to vertexshader folder.
Start game. ALT TAB. Then like 10 at at a time remove everything below output lines. Save.
Then alt tab back into game and click F10. till you find it.


It was a lot less fun without reconvert tool....let me tell you.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/21/2013 02:37 AM   
I don't have X3, so I can't take a look at the original shader. It would be very interesting to compare the original shader to the one that is working. I saw that + sign as well, and figure it's somehow related to telling the DLL that it should link in the vertex shader with the same number and .ps extension. Anybody have X3 to help figure this out? If not, I'll probably pick it up on Steam sale for future use. I'll also use an older DLL to search for vertex shader as you suggest.
I don't have X3, so I can't take a look at the original shader. It would be very interesting to compare the original shader to the one that is working.

I saw that + sign as well, and figure it's somehow related to telling the DLL that it should link in the vertex shader with the same number and .ps extension.

Anybody have X3 to help figure this out? If not, I'll probably pick it up on Steam sale for future use.


I'll also use an older DLL to search for vertex shader as you suggest.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/21/2013 03:04 AM   
I dont have but its skybox/stars. If that helps [its only thing it could be from his notes] Though, I really think its not that. I dont know where your going to draw depth from. W is going to = 1. Z is going to = 0. TBH, I've thought I needed to do it 5 times in past and I probably even did + sign and just dont remember. Everytime it didnt work but it was always games that didnt use 3_0. So I really think it was just I didnt dump and find it. I just assumed debugger would always pick it up. Also, before you do anything I forgot to mention, games that are that old have a 1/2 chance of being on wrong profile. Not only that, they could be on a NULL profile. Meaning if you try to use nvapi, it does jack or is just one eye. [overlord 2, singularity, Jericho, velvet assasin, etc]
I dont have but its skybox/stars. If that helps [its only thing it could be from his notes]

Though, I really think its not that. I dont know where your going to draw depth from. W is going to = 1.
Z is going to = 0. TBH, I've thought I needed to do it 5 times in past and I probably even did + sign and just dont remember. Everytime it didnt work but it was always games that didnt use 3_0. So I really think it was just I didnt dump and find it. I just assumed debugger would always pick it up.

Also, before you do anything I forgot to mention, games that are that old have a 1/2 chance of being on wrong profile. Not only that, they could be on a NULL profile. Meaning if you try to use nvapi, it does jack or is just one eye. [overlord 2, singularity, Jericho, velvet assasin, etc]

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/21/2013 03:39 AM   
Heh, yeah, I did some throwaway work before when it was as simple as doing profiles. First thing I try to do now is try some profiles. FlightSim has a profile, and switching to Prototype or Aion had no effect positive or negative. Shadows already look right in the sim. For the depth, I think that's why Helix's fix for X3 is not that clear for us. When you have a pixel fragment only, it's already been driven to the output screen depth for Z, so I agree that Z is probably -1, or maybe 0 there. But, the way I've read about this is that they do a reprojection back into the depth buffer from that x,y location. That makes it a vector instead of just a point, and whatever the vector first hits in the depth buffer is considered 'it', the vertex it came from. But, I don't think that's what Helix's fix is doing here. The Pixel Shader seems definitely modified to me. [s]It doesn't even output color there, oC0[/s]. (Output is valid as r0 for ps_1_1) It's still ps_1_1, but the code doesn't make any sense for that version. It doesn't use the input s0 texture sampler for example. In the matching Vertex Shader, the code doesn't do anything that looks like an inverse projection, no dot product, no multiply. Only one Mul, Add, but that is clearly for the stereoization code. The output from the Vertex shader is position, texture, and color. Just a theory- it seems to me like the Pixel shader gets called first, because that's how the code is originally written. Then, the Vertex shader is called at the tail of the Pixel shader, and it then has access to the position. It not's completely out of the realm of possibility that v0 as a position would still be valid, because something already translated v0 into x,y for the pixel shader. Not sure of course, but I'll play around with this idea using the X3 version of the dll.
Heh, yeah, I did some throwaway work before when it was as simple as doing profiles. First thing I try to do now is try some profiles. FlightSim has a profile, and switching to Prototype or Aion had no effect positive or negative. Shadows already look right in the sim.


For the depth, I think that's why Helix's fix for X3 is not that clear for us. When you have a pixel fragment only, it's already been driven to the output screen depth for Z, so I agree that Z is probably -1, or maybe 0 there.

But, the way I've read about this is that they do a reprojection back into the depth buffer from that x,y location. That makes it a vector instead of just a point, and whatever the vector first hits in the depth buffer is considered 'it', the vertex it came from.


But, I don't think that's what Helix's fix is doing here. The Pixel Shader seems definitely modified to me. It doesn't even output color there, oC0. (Output is valid as r0 for ps_1_1) It's still ps_1_1, but the code doesn't make any sense for that version. It doesn't use the input s0 texture sampler for example.

In the matching Vertex Shader, the code doesn't do anything that looks like an inverse projection, no dot product, no multiply. Only one Mul, Add, but that is clearly for the stereoization code. The output from the Vertex shader is position, texture, and color.

Just a theory- it seems to me like the Pixel shader gets called first, because that's how the code is originally written. Then, the Vertex shader is called at the tail of the Pixel shader, and it then has access to the position. It not's completely out of the realm of possibility that v0 as a position would still be valid, because something already translated v0 into x,y for the pixel shader.

Not sure of course, but I'll play around with this idea using the X3 version of the dll.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/21/2013 05:20 AM   
No, that "+" on the instruction is legit, it's just an ancient thing. I found the answer in here: [url]http://tog.acm.org/resources/shaderx/Direct3D.ShaderX.Vertex.and.Pixel.Shader.Tips.and.Tricks_Wolfgang.F.Engel_Wordware.Pub_2002.pdf[/url] That + sign means to issue both that instruction and the one prior to it, simultaneously. The ancient 1.1 pipeline could do both alpha and color channel calculations at the same time. [code] ps_1_1 tex t0 mul r0.w, t0.w, v0.w + mov r0.xyz, t0 [/code] In our case, the code is obfuscated because it shows the xyz, but it really means rgb. So, pretty much have to go with the idea that the pixel shader is completely unchanged.
No, that "+" on the instruction is legit, it's just an ancient thing. I found the answer in here:

http://tog.acm.org/resources/shaderx/Direct3D.ShaderX.Vertex.and.Pixel.Shader.Tips.and.Tricks_Wolfgang.F.Engel_Wordware.Pub_2002.pdf

That + sign means to issue both that instruction and the one prior to it, simultaneously. The ancient 1.1 pipeline could do both alpha and color channel calculations at the same time.

ps_1_1
tex t0
mul r0.w, t0.w, v0.w
+ mov r0.xyz, t0


In our case, the code is obfuscated because it shows the xyz, but it really means rgb.


So, pretty much have to go with the idea that the pixel shader is completely unchanged.

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/21/2013 05:51 AM   
This is an interesting thread and I think I've picked up on the issue, but I might be way off the mark... Since the days of Helix's X3 fix he has now developed the ability to "re-use" constant registers and sampler registers from other shaders, under certain circumstances. I summarized it in this thread somewhere before, and also look on the Mars War Logs Helix Wiki page in the comments. It depends what your shader is doing (I do not have the game you are talking about), but if you want to apply a stereo correction and have no depth you can find another shader that has a depth map (and note it needs to be the right kind derived from the View projection), and re-use that in your shader. Sample it either at the v0 position provided or derive a point from vPos. This is how to create a dynamic cross-hair for example. It might be what you need, but these things are all a bit hit or miss in my (limited) experience. Can you show us what the shader looks like that you are trying to fix?
This is an interesting thread and I think I've picked up on the issue, but I might be way off the mark... Since the days of Helix's X3 fix he has now developed the ability to "re-use" constant registers and sampler registers from other shaders, under certain circumstances. I summarized it in this thread somewhere before, and also look on the Mars War Logs Helix Wiki page in the comments. It depends what your shader is doing (I do not have the game you are talking about), but if you want to apply a stereo correction and have no depth you can find another shader that has a depth map (and note it needs to be the right kind derived from the View projection), and re-use that in your shader. Sample it either at the v0 position provided or derive a point from vPos. This is how to create a dynamic cross-hair for example. It might be what you need, but these things are all a bit hit or miss in my (limited) experience. Can you show us what the shader looks like that you are trying to fix?

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 06/21/2013 05:33 PM   
[quote="eqzitara"]Can anyone help me out with this[Lighting related]? Even if you dont know code, if you know a game that Helix fixed where issue happened prior to him fixing it that would help greatly [I been figuring stuff out by taking stuff apart pretty much]. Basically in Space marine I have it down to two issues. Shadows which i accepted I cant fix yet and projected shadows from [Deferred lighting(?} projected shadows*I believe*]. I gave up because I thought I wouldnt keep running into it. I ran into 2 games almost immediately where I fixed lighting and I ran into it. So I really want to figure it out. Its like this, I fix lighting entirely by fixing correcting the depth. Now (deferred?) lighting looks perfect and even the shadows seem more or less correct. Problem is when I enter light sources range [bubble], projected shadows snap in/out of place. I know I need to do something with the shadow projection sampler Im just not certain what. If worse comes to worse I can disable the projected shadow and doesn't greatly effect the visuals. I wasnt even going to ask but its becoming quite a few games since I learned how to fix this. Its just that everything is the same in each of these games which is just odd. The sampler for depth. The sampler for projected shadow. The vertex shaders are identical as well. Video->[url]https://s3.amazonaws.com/3drequest/Sequence+01_1.mp4[/url] [First five seconds are showing it "not fixed"] Code [code] // // Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022 // // Parameters: // // float3x3 c_mViewToObj; // float4 c_vColIllum; // float2 c_vDepthMapping; // float4 c_vFrustum; // float4 c_vLightPosViewDist; // float4 c_vScreenSizeDepth; // float4 c_vShadowOffsetMask; // float4 c_vSmoothDist; // sampler2D t_sDepth; // samplerCUBE t_sProjector; // // // Registers: // // Name Reg Size // ------------------- ----- ---- // c_vColIllum c0 1 // c_vScreenSizeDepth c1 1 // c_vFrustum c2 1 // c_vLightPosViewDist c3 1 // c_vSmoothDist c4 1 // c_vDepthMapping c5 1 // c_vShadowOffsetMask c6 1 // c_mViewToObj c7 3 // t_sDepth s0 1 // t_sProjector s1 1 // ps_3_0 def c10, 1, -1, 0.5, -0.5 def c11, 0.00100000005, 2, 3, 0 def c12, 8, 0.125, 1, 0 def c13, 5.96045986e-008, 65504, 0, 0 dcl_texcoord v0.xyz def c25, 0.5, 0, 0, 0 dcl vPos.xy dcl_2d s0 dcl_cube s1 rcp r0.x, v0.z mov r1.xy, c10 mul r0.yz, r1.xxyw, c1.xxyw mad r0.xy, v0, r0.x, r0.yzzw mad r0.zw, r0.xyxy, c10, c10.z add r0.xy, r0, c2.ywzw mul r0.zw, r0, c5.xyxy mov r11.xy, vPos.xy rcp r11.z, c210.x rcp r11.w, c210.y mul r11.xy, r11.xy, r11.zw mul r11.zw, r11.zw, c25.xx add r0.zw, r11.xyxy, r11.zwzw texld r2, r0.zwzw, s0 mad r3.z, r2.x, c1.w, -c1.z dsx r0.z, r3.z dsy r0.w, r3.z add r0.z, r0_abs.w, r0_abs.z min r1.x, r2.x, r0.z mul r0.z, r2.x, c12.x mad r0.z, r1.x, c12.y, r0.z mul r0.xy, r0, -r3.z mul r3.xy, r0, c2.xzzw add r0.xyw, r3.xyzz, -c3.xyzz dp3 r1.x, r0.xyww, c9 mov r2.z, -r1.x dp3 r2.x, r0.xyww, c7 dp3 r2.y, r0.xyww, c8 dp3 r0.x, r0.xyww, r0.xyww add r0.x, r0.x, c11.x rsq r0.y, r0.x rcp r0.x, r0.x max r1.x, r0.x, c4.z rcp r0.x, r0.y mad r0.y, r0.x, c4.w, r1.y mul r0.x, r0.x, c4.y mov_sat r0.x, r0.x mul r1.yzw, r0.y, c6.xxyz cmp r1.yzw, r0.y, r1, c11.w add r1.yzw, r1, r2.xxyz texld r2, r1.yzww, s1 add r0.y, r0.z, r2.w max r0.z, r1_abs.y, r1_abs.z max r2.w, r0.z, r1_abs.w mul_sat r0.z, r2.w, c4.y add r0.y, -r0.z, r0.y cmp r0.y, r0.y, c12.z, c12.w mad r0.z, r0.x, -c11.y, c11.z mad r0.z, c4.z, -r0.z, r1.x add r0.w, -r0.x, c10.x mul r0.x, r0.x, r0.x lrp r1.xyz, r0.x, c10.x, r2 add_sat r1.xyz, r1, c6.w mad r0.x, r0.w, r0.w, -r0.z mad r0.x, c4.x, r0.x, r0.z mul r0.xzw, r0.x, c0.xyyz mul r0.xzw, r1.xyyz, r0 mul r0.xyz, r0.y, r0.xzww max r1.xyz, r0, c13.x min oC0.xyz, r1, c13.y mov oC0.w, c11.w // approximately 57 instruction slots used (2 texture, 55 arithmetic) [/code] Unchanged Vertexshader. They are all identical in each game. [code] // // Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022 // // Parameters: // // float4x4 c_mObjToClip; // // // Registers: // // Name Reg Size // ------------ ----- ---- // c_mObjToClip c1 4 // vs_3_0 dcl_texcoord v0 dcl_texcoord o0.xyz dcl_position o1 dp4 o1.z, v0, c3 dp4 r0.x, v0, c1 dp4 r0.y, v0, c2 dp4 r0.w, v0, c4 mov o0.xyz, r0.xyww mov o1.xyw, r0 // approximately 6 instruction slots used [/code][/quote] Well I am not sure yet if I can help (!) but I can say that I currently have the exact same problem. I am close to a decent playable fix for Pay Day The Heist (it's certainly good in WIP form right now with a few selective settings), but as part of fixing all the screwed up lighting and double imaging, this particular problem popped into existence: when viewing a (static) shadow 'through' the light cone of a ceiling light, hanging light, flashlight or anything like that the shadow looks displaced, then pops into place when you stop viewing it 'through' the light cone, or you enter the light cone area. Somewhere in the complicated VS shaders I fixed for lighting (there are actually a few of them) I have introduced a displacement of a surface that is manifesting as a different depth for the shadows (or something). It also causes that 'lights being clipped at the edges' problem which looks crap, so when I have time to get back to it, I am pretty sure I need to go into the associated PS (which I have identified) and selectively fix the bit that is broken. This seems to be a common pattern with fixing water actually - the play off between reflections and refraction issues, where fixing the one that is broken in the VS then breaks the other one, and that then needs fixing in the PS. Please also let me know if you have a breakthrough, I could do with the help also :-)
eqzitara said:Can anyone help me out with this[Lighting related]? Even if you dont know code, if you know a game that Helix fixed where issue happened prior to him fixing it that would help greatly [I been figuring stuff out by taking stuff apart pretty much].

Basically in Space marine I have it down to two issues. Shadows which i accepted I cant fix yet and projected shadows from [Deferred lighting(?} projected shadows*I believe*]. I gave up because I thought I wouldnt keep running into it. I ran into 2 games almost immediately where I fixed lighting and I ran into it. So I really want to figure it out.
Its like this, I fix lighting entirely by fixing correcting the depth. Now (deferred?) lighting looks perfect and even the shadows seem more or less correct. Problem is when I enter light sources range [bubble], projected shadows snap in/out of place. I know I need to do something with the shadow projection sampler Im just not certain what. If worse comes to worse I can disable the projected shadow and doesn't greatly effect the visuals. I wasnt even going to ask but its becoming quite a few games since I learned how to fix this. Its just that everything is the same in each of these games which is just odd. The sampler for depth. The sampler for projected shadow. The vertex shaders are identical as well.
Video->https://s3.amazonaws.com/3drequest/Sequence+01_1.mp4 [First five seconds are showing it "not fixed"]
Code
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
// Parameters:
//
// float3x3 c_mViewToObj;
// float4 c_vColIllum;
// float2 c_vDepthMapping;
// float4 c_vFrustum;
// float4 c_vLightPosViewDist;
// float4 c_vScreenSizeDepth;
// float4 c_vShadowOffsetMask;
// float4 c_vSmoothDist;
// sampler2D t_sDepth;
// samplerCUBE t_sProjector;
//
//
// Registers:
//
// Name Reg Size
// ------------------- ----- ----
// c_vColIllum c0 1
// c_vScreenSizeDepth c1 1
// c_vFrustum c2 1
// c_vLightPosViewDist c3 1
// c_vSmoothDist c4 1
// c_vDepthMapping c5 1
// c_vShadowOffsetMask c6 1
// c_mViewToObj c7 3
// t_sDepth s0 1
// t_sProjector s1 1
//

ps_3_0
def c10, 1, -1, 0.5, -0.5
def c11, 0.00100000005, 2, 3, 0
def c12, 8, 0.125, 1, 0
def c13, 5.96045986e-008, 65504, 0, 0
dcl_texcoord v0.xyz
def c25, 0.5, 0, 0, 0
dcl vPos.xy
dcl_2d s0
dcl_cube s1
rcp r0.x, v0.z
mov r1.xy, c10
mul r0.yz, r1.xxyw, c1.xxyw
mad r0.xy, v0, r0.x, r0.yzzw
mad r0.zw, r0.xyxy, c10, c10.z
add r0.xy, r0, c2.ywzw
mul r0.zw, r0, c5.xyxy
mov r11.xy, vPos.xy
rcp r11.z, c210.x
rcp r11.w, c210.y
mul r11.xy, r11.xy, r11.zw
mul r11.zw, r11.zw, c25.xx
add r0.zw, r11.xyxy, r11.zwzw
texld r2, r0.zwzw, s0
mad r3.z, r2.x, c1.w, -c1.z
dsx r0.z, r3.z
dsy r0.w, r3.z
add r0.z, r0_abs.w, r0_abs.z
min r1.x, r2.x, r0.z
mul r0.z, r2.x, c12.x
mad r0.z, r1.x, c12.y, r0.z
mul r0.xy, r0, -r3.z
mul r3.xy, r0, c2.xzzw
add r0.xyw, r3.xyzz, -c3.xyzz
dp3 r1.x, r0.xyww, c9
mov r2.z, -r1.x
dp3 r2.x, r0.xyww, c7
dp3 r2.y, r0.xyww, c8
dp3 r0.x, r0.xyww, r0.xyww
add r0.x, r0.x, c11.x
rsq r0.y, r0.x
rcp r0.x, r0.x
max r1.x, r0.x, c4.z
rcp r0.x, r0.y
mad r0.y, r0.x, c4.w, r1.y
mul r0.x, r0.x, c4.y
mov_sat r0.x, r0.x
mul r1.yzw, r0.y, c6.xxyz
cmp r1.yzw, r0.y, r1, c11.w
add r1.yzw, r1, r2.xxyz
texld r2, r1.yzww, s1
add r0.y, r0.z, r2.w
max r0.z, r1_abs.y, r1_abs.z
max r2.w, r0.z, r1_abs.w
mul_sat r0.z, r2.w, c4.y
add r0.y, -r0.z, r0.y
cmp r0.y, r0.y, c12.z, c12.w
mad r0.z, r0.x, -c11.y, c11.z
mad r0.z, c4.z, -r0.z, r1.x
add r0.w, -r0.x, c10.x
mul r0.x, r0.x, r0.x
lrp r1.xyz, r0.x, c10.x, r2
add_sat r1.xyz, r1, c6.w
mad r0.x, r0.w, r0.w, -r0.z
mad r0.x, c4.x, r0.x, r0.z
mul r0.xzw, r0.x, c0.xyyz
mul r0.xzw, r1.xyyz, r0
mul r0.xyz, r0.y, r0.xzww
max r1.xyz, r0, c13.x
min oC0.xyz, r1, c13.y
mov oC0.w, c11.w

// approximately 57 instruction slots used (2 texture, 55 arithmetic)


Unchanged Vertexshader. They are all identical in each game.
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
// Parameters:
//
// float4x4 c_mObjToClip;
//
//
// Registers:
//
// Name Reg Size
// ------------ ----- ----
// c_mObjToClip c1 4
//

vs_3_0
dcl_texcoord v0
dcl_texcoord o0.xyz
dcl_position o1
dp4 o1.z, v0, c3
dp4 r0.x, v0, c1
dp4 r0.y, v0, c2
dp4 r0.w, v0, c4
mov o0.xyz, r0.xyww
mov o1.xyw, r0

// approximately 6 instruction slots used


Well I am not sure yet if I can help (!) but I can say that I currently have the exact same problem. I am close to a decent playable fix for Pay Day The Heist (it's certainly good in WIP form right now with a few selective settings), but as part of fixing all the screwed up lighting and double imaging, this particular problem popped into existence: when viewing a (static) shadow 'through' the light cone of a ceiling light, hanging light, flashlight or anything like that the shadow looks displaced, then pops into place when you stop viewing it 'through' the light cone, or you enter the light cone area. Somewhere in the complicated VS shaders I fixed for lighting (there are actually a few of them) I have introduced a displacement of a surface that is manifesting as a different depth for the shadows (or something). It also causes that 'lights being clipped at the edges' problem which looks crap, so when I have time to get back to it, I am pretty sure I need to go into the associated PS (which I have identified) and selectively fix the bit that is broken. This seems to be a common pattern with fixing water actually - the play off between reflections and refraction issues, where fixing the one that is broken in the VS then breaks the other one, and that then needs fixing in the PS.

Please also let me know if you have a breakthrough, I could do with the help also :-)

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 06/21/2013 05:45 PM   
@bo3b Wait, did you see if you can use dx9settings function to force it to render in stereo? THAT actually makes the most sense as the solution. Its what I did for Jade Empire's 2D lighting. @mikear69 I kind of know a solution, kind of don't. I can jury rig it for mediocre convergence setting kind of like how I used to fix shadows in my older UE3 titles. Likes its enough for FPS, Third person I am not sure[probably not]. I did it in serious sam 2, just posted it. Can look at code but you won't believe it works, but it does. It holds together for a good amount of convergence.
@bo3b
Wait, did you see if you can use dx9settings function to force it to render in stereo? THAT actually makes the most sense as the solution. Its what I did for Jade Empire's 2D lighting.

@mikear69
I kind of know a solution, kind of don't. I can jury rig it for mediocre convergence setting kind of like how I used to fix shadows in my older UE3 titles. Likes its enough for FPS, Third person I am not sure[probably not]. I did it in serious sam 2, just posted it. Can look at code but you won't believe it works, but it does. It holds together for a good amount of convergence.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/21/2013 05:57 PM   
@Eqzitara Cool, I'll have a look. Which shader file should I look in? I've just done a similar "fix" for the shadows in PayDay actually. They mostly work and adjust for convergence and separation according to an empirical formula I made up, and for that game, where all you want to do is shoot cops, it's good enough. I'll take 'good enough' for this light fix as well :-)
@Eqzitara Cool, I'll have a look. Which shader file should I look in? I've just done a similar "fix" for the shadows in PayDay actually. They mostly work and adjust for convergence and separation according to an empirical formula I made up, and for that game, where all you want to do is shoot cops, it's good enough. I'll take 'good enough' for this light fix as well :-)

Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278

Posted 06/21/2013 05:59 PM   
593E0C70.txt TBH, we both blame the bubble since thats the only apparent issue but the effect gets worse if you increase convergence and not only that but you can see shadows aren't 1:1 accurate even outside the "bubble". My guess is that shadows are wrong all together just 3D vision "guesses" its position [and actually does a good job]. Maybe it has to do with mana84 saying in a lot of games you cant fix shadows without forcing it mono first in a lot of games. This perhaps explains why helix never ran into it. He did, but never saw it since he always forces shadow mono [as far as I know]. Anywho, its good enough for me[Which say's something lol] and perhaps ill look into it more when a game I care about comes out but I broke my back on this enough so I'm calling it quits for now. Though I'd more then be happy to steal whatever you figure out -_o
593E0C70.txt

TBH, we both blame the bubble since thats the only apparent issue but the effect gets worse if you increase convergence and not only that but you can see shadows aren't 1:1 accurate even outside the "bubble". My guess is that shadows are wrong all together just 3D vision "guesses" its position [and actually does a good job]. Maybe it has to do with mana84 saying in a lot of games you cant fix shadows without forcing it mono first in a lot of games. This perhaps explains why helix never ran into it. He did, but never saw it since he always forces shadow mono [as far as I know].
Anywho, its good enough for me[Which say's something lol] and perhaps ill look into it more when a game I care about comes out but I broke my back on this enough so I'm calling it quits for now.
Though I'd more then be happy to steal whatever you figure out -_o

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/21/2013 06:24 PM   
I'm 86% certain you guys are secretly wizards.
I'm 86% certain you guys are secretly wizards.

Posted 06/22/2013 04:51 AM   
@Mikear69 Do you have any interest in Witcher 1? I know you talked a bit in thread I made earlier. I was actually quite wrong. I went through debugger like 3 times and didnt see it so I thought it wasnt there. I even tested to make sure it was hardware mouse which it its when in third person. Witcher 1 uses software mouse at least for first person view. I cant seem to rewrite the shader from 2.0-> 3.0 correctly [lighting gets skewed] but I can disable it and its def. mouse cursor [disapears]. EFC15E16.txt .Its actually even possible to seperate name tags/item tags it only effects inventory screen outside of name tags so you could use I for enable/disable.
@Mikear69
Do you have any interest in Witcher 1? I know you talked a bit in thread I made earlier. I was actually quite wrong. I went through debugger like 3 times and didnt see it so I thought it wasnt there. I even tested to make sure it was hardware mouse which it its when in third person.
Witcher 1 uses software mouse at least for first person view. I cant seem to rewrite the shader from 2.0-> 3.0 correctly [lighting gets skewed] but I can disable it and its def. mouse cursor [disapears]. EFC15E16.txt .Its actually even possible to seperate name tags/item tags it only effects inventory screen outside of name tags so you could use I for enable/disable.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/22/2013 09:00 AM   
[quote="eqzitara"]@bo3b Wait, did you see if you can use dx9settings function to force it to render in stereo? THAT actually makes the most sense as the solution. Its what I did for Jade Empire's 2D lighting.[/quote]That's a damn fine idea. I started to look more closely at it, but ran into a showstopper that I have no answer for. As the very first step, I copied the broken PS, unchanged, into the ShaderOverride folder, and adjusted the file name to be just the CRC as usual. It seems to compile without errors according to the log. But, that first step badly damages the image. I attach an example here. The original target of lights on the edge of the runway turn from small circles into large rectangles. The sky goes black and the instrument panel becomes random chunks of the aircraft texture. Seems like it's sampling the wrong part of the textures, or something like that. Not at all sure why the DLL would work (tried three different variants), override and recompile would work, but actually change the runtime. Any ideas?
eqzitara said:@bo3b
Wait, did you see if you can use dx9settings function to force it to render in stereo? THAT actually makes the most sense as the solution. Its what I did for Jade Empire's 2D lighting.
That's a damn fine idea. I started to look more closely at it, but ran into a showstopper that I have no answer for.

As the very first step, I copied the broken PS, unchanged, into the ShaderOverride folder, and adjusted the file name to be just the CRC as usual. It seems to compile without errors according to the log.

But, that first step badly damages the image. I attach an example here.

The original target of lights on the edge of the runway turn from small circles into large rectangles. The sky goes black and the instrument panel becomes random chunks of the aircraft texture. Seems like it's sampling the wrong part of the textures, or something like that.

Not at all sure why the DLL would work (tried three different variants), override and recompile would work, but actually change the runtime. Any ideas?

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/23/2013 12:08 AM   
Was it a ps_3_0? If not try to rewrite it. It could be a conflict. I had to change samplers in a few games to get it to work even though shaders I was using didnt use them. I gave up on it because it bored me to tears but in Alan Wake if you inject any shader the contrast shifts with convergence even though s0 / s13 werent in use in those shaders. DefVSSampler = 259 DefPSSampler = 14 I doubt it uses anywhere near 210 but can try this as well DefPSViewSizeConst = 280 Wierd stuff happens on conflicts.
Was it a ps_3_0? If not try to rewrite it.

It could be a conflict. I had to change samplers in a few games to get it to work even though shaders I was using didnt use them. I gave up on it because it bored me to tears but in Alan Wake if you inject any shader the contrast shifts with convergence even though s0 / s13 werent in use in those shaders.

DefVSSampler = 259
DefPSSampler = 14


I doubt it uses anywhere near 210 but can try this as well

DefPSViewSizeConst = 280

Wierd stuff happens on conflicts.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 06/23/2013 01:29 AM   
Cool, thanks for the suggestion. It's a 2.0 shader, and I did try converting it to 3.0, but was getting a bizarre driver error in the log. Not a compilation error, a driver level 'bad call'. Error in pixel shader result: 0x80004005 Here's the code for that shader. It does seem to be used in many place, and I'll also try the .1, .2 addition to select a specific shader. [code] ps_2_0 dcl_pp t0.xy dcl v0 dcl_2d s0 texld_pp r0, t0, s0 mul_pp r0, r0, v0 mov_pp oC0, r0 [/code]
Cool, thanks for the suggestion. It's a 2.0 shader, and I did try converting it to 3.0, but was getting a bizarre driver error in the log.

Not a compilation error, a driver level 'bad call'.

Error in pixel shader result: 0x80004005


Here's the code for that shader. It does seem to be used in many place, and I'll also try the .1, .2 addition to select a specific shader.

ps_2_0
dcl_pp t0.xy
dcl v0
dcl_2d s0
texld_pp r0, t0, s0
mul_pp r0, r0, v0
mov_pp oC0, r0

Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers

Posted 06/23/2013 01:45 AM   
  131 / 167    
Scroll To Top