How to fix/disable shaders in games(DLL,guide and fixes).
  130 / 167    
@eqzitara That's really useful stuff. I did not know about the zw depth sampler, and I did not know SetSkipScissorRect only worked on some profiles. Two very useful Top Tips, thanks. I can try then both out. What profiles do you know of that support the SetSkipScissorRect function? Clearly DragonAge2.exe does. I'll check out Helix's own fixes to see where he has used it, that should provide a list of profiles. Well done with DA2 - are you going to post it up to the Blog? Regardless of PayDay 2 coming out, I'll chip away at PayDay 1, it's a good learning exercise, and I have fixed most of the lighting issues (which were nasty and made the game unplayable by themselves). I can keep chipping away at this clipping thing, or I can easily disable the specific lights that cause it without massive loss of visuals. It's my new "backburner" project, and who knows if PayDay 2 is as nasty in 3D when it comes out I might have a head start on it lol.
@eqzitara That's really useful stuff. I did not know about the zw depth sampler, and I did not know SetSkipScissorRect only worked on some profiles. Two very useful Top Tips, thanks. I can try then both out. What profiles do you know of that support the SetSkipScissorRect function? Clearly DragonAge2.exe does. I'll check out Helix's own fixes to see where he has used it, that should provide a list of profiles.

Well done with DA2 - are you going to post it up to the Blog?

Regardless of PayDay 2 coming out, I'll chip away at PayDay 1, it's a good learning exercise, and I have fixed most of the lighting issues (which were nasty and made the game unplayable by themselves). I can keep chipping away at this clipping thing, or I can easily disable the specific lights that cause it without massive loss of visuals. It's my new "backburner" project, and who knows if PayDay 2 is as nasty in 3D when it comes out I might have a head start on it lol.

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

Posted 06/10/2013 02:05 PM   
Dragonage2-> Standard profile/ unprofiled game [Like Profile A]. I dont really understand witcher profile. I knew it fixes models [before helix mod] and I knew it would fix DA2's models but its like the skipsetrect function doesnt work with dll but the profile itself uses skipsetrect on models if that's possible. I guess its useful for a game that has "side effects" but you need it for models. I will post today sometime. EDIT: Wierdness. I never, ever went into C:\Users\eqz\Documents\NVStereoscopic3D.LOG\ It has a lot of information on game. I guess its not particularly useful but it was wierd to see [How many shaders game has] err.. I ment I did go into it before but I never noticed that it had so much information.
Dragonage2-> Standard profile/ unprofiled game [Like Profile A].
I dont really understand witcher profile. I knew it fixes models [before helix mod] and I knew it would fix DA2's models but its like the skipsetrect function doesnt work with dll but the profile itself uses skipsetrect on models if that's possible. I guess its useful for a game that has "side effects" but you need it for models.

I will post today sometime.

EDIT: Wierdness. I never, ever went into C:\Users\eqz\Documents\NVStereoscopic3D.LOG\
It has a lot of information on game. I guess its not particularly useful but it was wierd to see [How many shaders game has]
err.. I ment I did go into it before but I never noticed that it had so much information.

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/10/2013 05:01 PM   
Yeah that's where convergence values get written to as well, I've used that before.
Yeah that's where convergence values get written to as well, I've used that before.

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

Posted 06/10/2013 06:44 PM   
err I ment I knew that but I didnt see the weird stuff before. Like how many vs_3_0 shaders / vs-_2_0 /etc. What type of "textures?" are used. On the off chance anyone is reading this thats interested in Dragon Age Origins. Im stealth updating it with Dragon Age 2 features [Middle mouse button for cinematic/gameplay preset. Cinematic preset turns off depth hud]
err I ment I knew that but I didnt see the weird stuff before. Like how many vs_3_0 shaders / vs-_2_0 /etc. What type of "textures?" are used.

On the off chance anyone is reading this thats interested in Dragon Age Origins. Im stealth updating it with Dragon Age 2 features [Middle mouse button for cinematic/gameplay preset. Cinematic preset turns off depth hud]

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/10/2013 09:53 PM   
Wow, I can't believe I figured this out. Alright, details. First off visit the Mars War Logs Comments. Read helix's explanation. Serious Sam 3. Patch came out great... till someone on single card tried it. Issues. ALOT of lighting effects were 2D[Like surface light reflections, a glowing effect, etc] Anywho when I looked at the shaders and had no idea. But then I figured it has something to do with some weird 3d vision heuristics. So grab the newest debug and start a new dx9settings.ini So I know = 0 is default 3D VISION / = 1 is force stereo / = 2 is force mono So I needed to force stereo. So I pasted.... DefSquareSurfaceMode = 1 DefDepthStencilSurfaceMode = 1 DefSurfaceCreationMode = 1 I tested each one by // In front. I found that Depth stencil surface mode and square surface mode both fixed it. So by process of elimination. It was a depth stencil with a square surface....Problem is square surface's are a ton of stuff like shadows/etc. So i needed to seperate it. Now I dont know how helix does it[The smart way lol] but I went into the log. And wrote down each square format. Now helix's description says Usage is whatever you want. 1- 3D 2- Mono I needed 1. Now fortunately I knew it was a depthsurface. Unfortunately I have no idea what the other option is. Anywho depthsurface = 1 Now in dx9settings.ini I commented out DefSquareSurfaceMode = 1 DefDepthStencilSurfaceMode = 1 So end results of all square/depth stencils were.. There were 5 square formats [same width/height] So I tried each of them. And started game.... It worked. So I disabled them one at at a time [exit/restart "might be a better way but I didnt chance it] till I found the one I needed. I still got to fix water reflections for non sli [But its not really most popular game so I may disable]. I dunno yet, I know same rules apply but ill give it 10 minutes and see what happens. I dont want to sound preachy or anything but I drop games... alot. When I dont get it good enough. Now the last two games, space marine/ Serious sam bfe. I couldnt fix it normally as Ive done in every other game thus far. Instead of dropping, I said why?
Wow, I can't believe I figured this out. Alright, details.
First off visit the Mars War Logs Comments. Read helix's explanation.
Serious Sam 3. Patch came out great... till someone on single card tried it. Issues.
ALOT of lighting effects were 2D[Like surface light reflections, a glowing effect, etc]

Anywho when I looked at the shaders and had no idea. But then I figured it has something to do with some weird 3d vision heuristics. So grab the newest debug and start a new dx9settings.ini
So I know = 0 is default 3D VISION / = 1 is force stereo / = 2 is force mono
So I needed to force stereo. So I pasted....

DefSquareSurfaceMode = 1
DefDepthStencilSurfaceMode = 1
DefSurfaceCreationMode = 1

I tested each one by // In front. I found that Depth stencil surface mode and square surface mode both fixed it. So by process of elimination. It was a depth stencil with a square surface....Problem is square surface's are a ton of stuff like shadows/etc. So i needed to seperate it. Now I dont know how helix does it[The smart way lol] but I went into the log. And wrote down each square format.
Now helix's description says
Usage is whatever you want.
1- 3D 2- Mono
I needed 1.
Now fortunately I knew it was a depthsurface. Unfortunately I have no idea what the other option is. Anywho depthsurface = 1

Now in dx9settings.ini
I commented out
DefSquareSurfaceMode = 1
DefDepthStencilSurfaceMode = 1

So end results of all square/depth stencils were..
There were 5 square formats [same width/height]
So I tried each of them.

And started game....
It worked. So I disabled them one at at a time [exit/restart "might be a better way but I didnt chance it] till I found the one I needed. I still got to fix water reflections for non sli [But its not really most popular game so I may disable]. I dunno yet, I know same rules apply but ill give it 10 minutes and see what happens.

I dont want to sound preachy or anything but I drop games... alot. When I dont get it good enough. Now the last two games, space marine/ Serious sam bfe. I couldnt fix it normally as Ive done in every other game thus far. Instead of dropping, I said why?

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/13/2013 06:56 AM   
Fantastic work, well done.
Fantastic work, well done.

Posted 06/13/2013 07:36 AM   
Yeah, awesome! And thanks for the description. I need to give those a try.
Yeah, awesome! And thanks for the description. I need to give those a try.

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/13/2013 09:37 AM   
Thanks eqzitara for the explanation!! I may give it a try again an old game i want to fix that have some rare shadows issues. I think DefSquareSurfaceMode = 1 may fix that.
Thanks eqzitara for the explanation!!

I may give it a try again an old game i want to fix that have some rare shadows issues. I think DefSquareSurfaceMode = 1 may fix that.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 06/13/2013 01:19 PM   
Note also that Helix has provided the capability to pick out surfaces specifically. In DX9Settings.ini you enumerate a surface list, then use a "[SF0]", "[SF1]" or whatever section to define the mono/stereo stuff. @eqzitara - is that what you did? You need to look in the LOG.txt to get the list of surfaces the DLL identifies and try them out, using the same process of elimination you used.
Note also that Helix has provided the capability to pick out surfaces specifically. In DX9Settings.ini you enumerate a surface list, then use a "[SF0]", "[SF1]" or whatever section to define the mono/stereo stuff. @eqzitara - is that what you did? You need to look in the LOG.txt to get the list of surfaces the DLL identifies and try them out, using the same process of elimination you used.

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

Posted 06/13/2013 04:17 PM   
Files up, but yes. I didnt take chances though since it was first time I just did one at a time. Like I looked at log and anything with same width/height I wrote down. SurfaceCreationModeList = 2; [SF2] DefMode = 1 ExceptSquare = false Format=113 Usage = 1 was end results. Log said... [and many more square ones] D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 256 Width 256 Usage 1 Format 113 Pool 0 Levels 1 texptr 0 nIndex 8, Mode Luckily I didnt have to try it but like format 113 handles a lot of different things. Its possible it would of messed other stuff up. Im pretty sure thats why helix has a function to bind exact height/width. I cant say for certain on this though. Im just 90% sure because there are a lot of different rendertargets on the same format. Im pretty sure its like seperating textures. We dont always want to do the same thing with them all. Of course I can be dead wrong.
Files up, but yes. I didnt take chances though since it was first time I just did one at a time.
Like I looked at log and anything with same width/height I wrote down.

SurfaceCreationModeList = 2;

[SF2]
DefMode = 1
ExceptSquare = false
Format=113
Usage = 1

was end results.
Log said... [and many more square ones]
D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 256 Width 256 Usage 1 Format 113 Pool 0 Levels 1 texptr 0 nIndex 8, Mode

Luckily I didnt have to try it but like format 113 handles a lot of different things. Its possible it would of messed other stuff up. Im pretty sure thats why helix has a function to bind exact height/width. I cant say for certain on this though. Im just 90% sure because there are a lot of different rendertargets on the same format. Im pretty sure its like seperating textures. We dont always want to do the same thing with them all. Of course I can be dead wrong.

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/13/2013 04:54 PM   
O yea, I forgot to write about this. Occasionally I cant get helix's right click feature to work in some games which is not a huge deal if your willing to use ahk [tsaebeht wrote the script I needed btw.] Anywho, not sure if anyone is interested in this. It may just be me since I been wanting to try new stuff. This would only work for ahk so if anyone cant get helixs right click feature to work its something cool to try out. I kind of have this thing with the center of screen and text/hud [Maybe its just me. I ranted about how developers do it more then once or twice lol.] I mean its not game breaking or anything but it just something I don't like. Anywho I added the feature to Serious Sam 3 to see how well it worked. I did something similiar with borderlands 2 but it was one of those miracle games where its 1-1000 where you can do it and I was extremely limited by borderlands 2 hud. Anywho if anyones interested its here. [url]https://s3.amazonaws.com/eqznew/Sam3BFE/Sequence+01_8.mp4[/url] It would of been very simple had the game had a normal shader hud [just hud] and gave me more then one texture at a time. So I got as many as possible in dx9settings then did an IF STATEMENT -- PUSH INTO DEPTH IF NOT DEFINED. So it requires an alt tab to work. Its not 100% perfect but is optional. I will try to get it better next time if hud works out better. Ive alway been a fan of how bulletstorm puts the center text instead of 2D in depth a tiny bit. Like reload/pick up item. Its a nice touch I admired. So I borrowed it and improved upon it. Again, its probably not worth it unless you have to use AHK for something which is not usual. But I had to use it on two games recently so I thought it was worth throwing out there. If anyone ever has anything to show me/teach me I'd be interested. Edit: Used new features as above to force lights in jade empire into 3D|| then it was at wrong depth like UE3 lensflares but I pushed into depth by a % till it was accurate. I can only get them 97%ish accurate though. I might not do it since these are "for show" lights and are pretty ugly. Edit2: Got it a bit better so gonna update it.
O yea, I forgot to write about this. Occasionally I cant get helix's right click feature to work in some games which is not a huge deal if your willing to use ahk [tsaebeht wrote the script I needed btw.]

Anywho, not sure if anyone is interested in this. It may just be me since I been wanting to try new stuff. This would only work for ahk so if anyone cant get helixs right click feature to work its something cool to try out. I kind of have this thing with the center of screen and text/hud [Maybe its just me. I ranted about how developers do it more then once or twice lol.] I mean its not game breaking or anything but it just something I don't like. Anywho I added the feature to Serious Sam 3 to see how well it worked. I did something similiar with borderlands 2 but it was one of those miracle games where its 1-1000 where you can do it and I was extremely limited by borderlands 2 hud.

Anywho if anyones interested its here.
https://s3.amazonaws.com/eqznew/Sam3BFE/Sequence+01_8.mp4
It would of been very simple had the game had a normal shader hud [just hud] and gave me more then one texture at a time. So I got as many as possible in dx9settings then did an IF STATEMENT -- PUSH INTO DEPTH IF NOT DEFINED. So it requires an alt tab to work. Its not 100% perfect but is optional. I will try to get it better next time if hud works out better.

Ive alway been a fan of how bulletstorm puts the center text instead of 2D in depth a tiny bit. Like reload/pick up item. Its a nice touch I admired. So I borrowed it and improved upon it. Again, its probably not worth it unless you have to use AHK for something which is not usual. But I had to use it on two games recently so I thought it was worth throwing out there.



If anyone ever has anything to show me/teach me I'd be interested.

Edit: Used new features as above to force lights in jade empire into 3D|| then it was at wrong depth like UE3 lensflares but I pushed into depth by a % till it was accurate. I can only get them 97%ish accurate though. I might not do it since these are "for show" lights and are pretty ugly.
Edit2: Got it a bit better so gonna update it.

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/13/2013 10:43 PM   
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]
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

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/17/2013 12:24 AM   
Don't have anything to offer on your question there. What does it look like before you fix? Does it do that snap in/out also? If not, it seems like the fix is making it sensitive to z somehow. Or maybe w. I'm still not completely clear on what w is.
Don't have anything to offer on your question there. What does it look like before you fix? Does it do that snap in/out also? If not, it seems like the fix is making it sensitive to z somehow. Or maybe w. I'm still not completely clear on what w is.

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 01:03 AM   
Anybody know how to add a vertex shader when one is missing? I'm looking at Flight Simulator and the lights on the runways are terrible, at screen depth. I've found the pixel shader associated, but it has no corresponding vertex shader, so as far as I know I cannot make move the vertexes to make it stereo. Helix mentioned in his DLL post that he would post info on how to add a vertex shader for a situation like this, but I couldn't find any info regarding that. He does use the technique in X3, but I've been unable to understand it. Anybody done this, and can provide more details? Thanks.
Anybody know how to add a vertex shader when one is missing?

I'm looking at Flight Simulator and the lights on the runways are terrible, at screen depth. I've found the pixel shader associated, but it has no corresponding vertex shader, so as far as I know I cannot make move the vertexes to make it stereo.

Helix mentioned in his DLL post that he would post info on how to add a vertex shader for a situation like this, but I couldn't find any info regarding that. He does use the technique in X3, but I've been unable to understand it.

Anybody done this, and can provide more details? Thanks.

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 01:06 AM   
Helix actually got back to me and he didnt know so yeah, dont worry about it. It did happen prior though, it was in opening of video. Its not the worst thing in the world to disable. Its seems to be triggering under a certain circumstance which is wierd. Like maybe when Z is 1 or something. Its probably some messed up 3D vision logic. I actually ran into same thing with microsoft flight simulator when i first started. Helix added added the ability to fix something without a vertexshader but Ive only seen it use it once. Its fundamentally simple but I cant get it to work ever when I tried but I think the reason is explained down.[my bet] Look at his files for X3: terran conflict/ albion prelude He puts the unchanged pixelshader in folder pixelshader folder. Then forwards the information to the vertexshader. Renames extention to .ps Like if the only texcoord5 is used in pixelshader you will need to do Texcoord5 v0 position v1 color v2 Texcoord5 o0 position o1 color o2 mov r12, v0 mov o1, v1 mov o2, v2 //code here mov o0, r12 [My bet]Though there is another possiblility. Helix debugger may just not be picking it up. Ive noticed this happening in older games because they use older shader format. [1_1 / 2_0] . Like it may not even be able to see the shader or you go through it and you see no change on screen. Like in jade empire and most recent game I posted I couldnt find a hud shader with debugger but could with dumpall. I couldnt find a shader for hud in King's bounty. This was before I knew this and I just gave up on it but its probably same thing because I know I had to rewrite shaders. I dont think an object can have depth and not have a vertexshader. Like I think the method above is only for things without depth like huds/skyboxes/ etc. If you get closer to light and it doesnt change size in 2D then maybe but I dont know how youd fix something from pixelshader that doesnt have depth. Like you may be able to force max depth or put in certain depth but I dont know where your going to get the "correct depth". EDIT: Thats strange.... when he explained it in this thread somewhere. I just opened x3 and he said unchanged pixelshader... There is a + sign in his code.
Helix actually got back to me and he didnt know so yeah, dont worry about it. It did happen prior though, it was in opening of video.
Its not the worst thing in the world to disable. Its seems to be triggering under a certain circumstance which is wierd. Like maybe when Z is 1 or something. Its probably some messed up 3D vision logic.





I actually ran into same thing with microsoft flight simulator when i first started.

Helix added added the ability to fix something without a vertexshader but Ive only seen it use it once. Its fundamentally simple but I cant get it to work ever when I tried but I think the reason is explained down.[my bet]
Look at his files for X3: terran conflict/ albion prelude
He puts the unchanged pixelshader in folder pixelshader folder.
Then forwards the information to the vertexshader. Renames extention to .ps
Like if the only texcoord5 is used in pixelshader you will need to do

Texcoord5 v0
position v1
color v2
Texcoord5 o0
position o1
color o2
mov r12, v0
mov o1, v1
mov o2, v2
//code here
mov o0, r12

[My bet]Though there is another possiblility. Helix debugger may just not be picking it up. Ive noticed this happening in older games because they use older shader format. [1_1 / 2_0] . Like it may not even be able to see the shader or you go through it and you see no change on screen. Like in jade empire and most recent game I posted I couldnt find a hud shader with debugger but could with dumpall. I couldnt find a shader for hud in King's bounty. This was before I knew this and I just gave up on it but its probably same thing because I know I had to rewrite shaders.
I dont think an object can have depth and not have a vertexshader. Like I think the method above is only for things without depth like huds/skyboxes/ etc. If you get closer to light and it doesnt change size in 2D then maybe but I dont know how youd fix something from pixelshader that doesnt have depth. Like you may be able to force max depth or put in certain depth but I dont know where your going to get the "correct depth".

EDIT: Thats strange.... when he explained it in this thread somewhere. I just opened x3 and he said unchanged pixelshader...
There is a + sign in his code.

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 01:17 AM   
  130 / 167    
Scroll To Top