Bo3b's School For Shaderhackers
  33 / 87    
And here's what I think is the right vertex shader for this effect. It has c199 which I've declared in pixel shaders. I have a very old dump of this shader that doesn't have c199 so it definitely came from a pixel shader. How did it get in here? Any idea folks? [code] //Shader for AO effect? vs_3_0 def c19, 0.5, 1, 0, 0 def c199, 0, 1, 0.0625, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 dcl_texcoord o0 dcl_texcoord1 o1 dcl_texcoord2 o2 dcl_position o3 mul r1.xyz, v1, c17.w dp3 r2.w, r1, c5 dp3 r0.x, r1, c4 dp3 r0.z, r1, c6 mov r0.y, r2.w mul r1, r0.xyzz, r0.yzzx mov r0.w, c19.y dp4 r2.z, r0, c12 dp4 r2.y, r0, c11 dp4 r2.x, r0, c10 mul r0.y, r2.w, r2.w dp4 r3.z, r1, c15 dp4 r3.y, r1, c14 dp4 r3.x, r1, c13 dp4 r1.w, v0, c3 dp4 r1.z, v0, c2 mad r0.x, r0, r0, -r0.y add r3.xyz, r2, r3 mul r2.xyz, r0.x, c16 dp4 r1.x, v0, c0 dp4 r1.y, v0, c1 mul r0.xyz, r1.xyww, c19.x mul r0.y, r0, c8.x add o2.xyz, r3, r2 mad o1.xy, r0.z, c9.zwzw, r0 mov o3, r1 mov o1.zw, r1 mad o0.xy, v2, c18, c18.zwzw // approximately 28 instruction slots used [/code]
And here's what I think is the right vertex shader for this effect. It has c199 which I've declared in pixel shaders. I have a very old dump of this shader that doesn't have c199 so it definitely came from a pixel shader. How did it get in here? Any idea folks?

//Shader for AO effect?

vs_3_0
def c19, 0.5, 1, 0, 0
def c199, 0, 1, 0.0625, 0
dcl_position v0
dcl_normal v1
dcl_texcoord v2
dcl_texcoord o0
dcl_texcoord1 o1
dcl_texcoord2 o2
dcl_position o3
mul r1.xyz, v1, c17.w
dp3 r2.w, r1, c5
dp3 r0.x, r1, c4
dp3 r0.z, r1, c6
mov r0.y, r2.w
mul r1, r0.xyzz, r0.yzzx
mov r0.w, c19.y
dp4 r2.z, r0, c12
dp4 r2.y, r0, c11
dp4 r2.x, r0, c10
mul r0.y, r2.w, r2.w
dp4 r3.z, r1, c15
dp4 r3.y, r1, c14
dp4 r3.x, r1, c13
dp4 r1.w, v0, c3
dp4 r1.z, v0, c2
mad r0.x, r0, r0, -r0.y
add r3.xyz, r2, r3
mul r2.xyz, r0.x, c16
dp4 r1.x, v0, c0
dp4 r1.y, v0, c1
mul r0.xyz, r1.xyww, c19.x
mul r0.y, r0, c8.x
add o2.xyz, r3, r2
mad o1.xy, r0.z, c9.zwzw, r0
mov o3, r1
mov o1.zw, r1
mad o0.xy, v2, c18, c18.zwzw

// approximately 28 instruction slots used

Posted 04/17/2015 11:43 AM   
I've seen Helix mod sometimes dump out one of my modified shaders instead of the original, but with indentation reset and comments removed. I'm still not sure of the exact circumstances that lead to this happening, but I've noticed that sometimes when this happens the CRC may not be the same as the original, so try to get the real original if possible. I've also noticed in some games the shaders dumped in SingleShaders are missing headers, while the shaders in AllShaders have them - it behaves as though I had turned on UseAlternateCRC, though I did not. The vertex shaders are easy enough to fetch from AllShaders as the CRCs match, but the CRCs for the pixel shaders differ in this case (IIRC the red text shows the CRC you can find in AllShaders, but the shader dumped to SingleShaders ends up with a different CRC). Not sure why this happens in some games. Regarding this vertex shader, I can see a possible halo issue as the temporary variable (r1) that is copied to the output position (o3) has also been used to calculate a texture coordinate (o1). My shadertool.py can automatically fix many* of these types of issues with --auto-fix-vertex-halo. This one is a little tricky due to how the instructions got arranged, but I've made it smart enough to cope with that (as 99% of all Unity shaders are like this): [code] //Shader for AO effect? vs_3_0 def c19, 0.5, 1, 0, 0 def c199, 0, 1, 0.0625, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 dcl_texcoord o0 dcl_texcoord1 o1 dcl_texcoord2 o2 dcl_position o3 def c220, 0, 1, 0.0625, 0.5 dcl_2d s0 mul r1.xyz, v1, c17.w dp3 r2.w, r1, c5 dp3 r0.x, r1, c4 dp3 r0.z, r1, c6 mov r0.y, r2.w mul r1, r0.xyzz, r0.yzzx mov r0.w, c19.y dp4 r2.z, r0, c12 dp4 r2.y, r0, c11 dp4 r2.x, r0, c10 mul r0.y, r2.w, r2.w dp4 r3.z, r1, c15 dp4 r3.y, r1, c14 dp4 r3.x, r1, c13 dp4 r1.w, v0, c3 dp4 r1.z, v0, c2 mad r0.x, r0, r0, -r0.y add r3.xyz, r2, r3 mul r2.xyz, r0.x, c16 dp4 r1.x, v0, c0 dp4 r1.y, v0, c1 mov o3, r1 // Relocated from line 38 with shadertool.py // Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py: // shadertool.py --auto-fix-vertex-halo -o bar.txt foo.txt texldl r31, c220.z, s0 add r31.w, r1.w, -r31.y mad r1.x, r31.w, r31.x, r1.x mul r0.xyz, r1.xyww, c19.x mul r0.y, r0, c8.x add o2.xyz, r3, r2 mad o1.xy, r0.z, c9.zwzw, r0 // mov o3, r1 // Relocated to line 34 with shadertool.py mov o1.zw, r1 mad o0.xy, v2, c18, c18.zwzw // approximately 28 instruction slots used [/code] * it doesn't always work, and sometimes it makes things worse. But in a many cases I've found it can still be faster to start with it and manually fix anything that it didn't work on. Recommended for Unity 4 games, not recommended for Unreal games. YMMV.
I've seen Helix mod sometimes dump out one of my modified shaders instead of the original, but with indentation reset and comments removed. I'm still not sure of the exact circumstances that lead to this happening, but I've noticed that sometimes when this happens the CRC may not be the same as the original, so try to get the real original if possible.

I've also noticed in some games the shaders dumped in SingleShaders are missing headers, while the shaders in AllShaders have them - it behaves as though I had turned on UseAlternateCRC, though I did not. The vertex shaders are easy enough to fetch from AllShaders as the CRCs match, but the CRCs for the pixel shaders differ in this case (IIRC the red text shows the CRC you can find in AllShaders, but the shader dumped to SingleShaders ends up with a different CRC). Not sure why this happens in some games.

Regarding this vertex shader, I can see a possible halo issue as the temporary variable (r1) that is copied to the output position (o3) has also been used to calculate a texture coordinate (o1). My shadertool.py can automatically fix many* of these types of issues with --auto-fix-vertex-halo. This one is a little tricky due to how the instructions got arranged, but I've made it smart enough to cope with that (as 99% of all Unity shaders are like this):

//Shader for AO effect?

vs_3_0
def c19, 0.5, 1, 0, 0
def c199, 0, 1, 0.0625, 0
dcl_position v0
dcl_normal v1
dcl_texcoord v2
dcl_texcoord o0
dcl_texcoord1 o1
dcl_texcoord2 o2
dcl_position o3

def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

mul r1.xyz, v1, c17.w
dp3 r2.w, r1, c5
dp3 r0.x, r1, c4
dp3 r0.z, r1, c6
mov r0.y, r2.w
mul r1, r0.xyzz, r0.yzzx
mov r0.w, c19.y
dp4 r2.z, r0, c12
dp4 r2.y, r0, c11
dp4 r2.x, r0, c10
mul r0.y, r2.w, r2.w
dp4 r3.z, r1, c15
dp4 r3.y, r1, c14
dp4 r3.x, r1, c13
dp4 r1.w, v0, c3
dp4 r1.z, v0, c2
mad r0.x, r0, r0, -r0.y
add r3.xyz, r2, r3
mul r2.xyz, r0.x, c16
dp4 r1.x, v0, c0
dp4 r1.y, v0, c1

mov o3, r1 // Relocated from line 38 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py --auto-fix-vertex-halo -o bar.txt foo.txt
texldl r31, c220.z, s0
add r31.w, r1.w, -r31.y
mad r1.x, r31.w, r31.x, r1.x

mul r0.xyz, r1.xyww, c19.x
mul r0.y, r0, c8.x
add o2.xyz, r3, r2
mad o1.xy, r0.z, c9.zwzw, r0

// mov o3, r1 // Relocated to line 34 with shadertool.py
mov o1.zw, r1
mad o0.xy, v2, c18, c18.zwzw

// approximately 28 instruction slots used


* it doesn't always work, and sometimes it makes things worse. But in a many cases I've found it can still be faster to start with it and manually fix anything that it didn't work on. Recommended for Unity 4 games, not recommended for Unreal games. YMMV.

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

Posted 04/17/2015 01:06 PM   
Hi guys, Don't really know where to post this but I am trying to find the shadow shaders for Mortal Kombat X. I did find them both PS or VS. However when I dump them it also generates a sound like it failed. Hitting F10 will give the same "fail" sound. I believe there are some decompiling issues with these shaders as it works for other shaders (in the game) if I want to dump them. Let me know what I can do from my end so you can investigate this issue;)) Big Thx;))
Hi guys,

Don't really know where to post this but I am trying to find the shadow shaders for Mortal Kombat X.
I did find them both PS or VS. However when I dump them it also generates a sound like it failed.
Hitting F10 will give the same "fail" sound. I believe there are some decompiling issues with these shaders as it works for other shaders (in the game) if I want to dump them.

Let me know what I can do from my end so you can investigate this issue;))
Big Thx;))

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 04/18/2015 12:10 PM   
That probably means that the decompiler produced bad code. Check the log file to see what the error was - if it's something simple you might be able to just fix it up in by hand (e.g. if you get a bad mask like r1.xyzw just remove the mask just leaving r1). If it's more complicated or happens a lot it may need a decompiler fix - bo3b can help you there.
That probably means that the decompiler produced bad code. Check the log file to see what the error was - if it's something simple you might be able to just fix it up in by hand (e.g. if you get a bad mask like r1.xyzw just remove the mask just leaving r1). If it's more complicated or happens a lot it may need a decompiler fix - bo3b can help you there.

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

Posted 04/18/2015 01:22 PM   
[quote="helifax"]Hi guys, Don't really know where to post this but I am trying to find the shadow shaders for Mortal Kombat X. I did find them both PS or VS. However when I dump them it also generates a sound like it failed. Hitting F10 will give the same "fail" sound. I believe there are some decompiling issues with these shaders as it works for other shaders (in the game) if I want to dump them. Let me know what I can do from my end so you can investigate this issue;)) Big Thx;))[/quote] Yep, take a look at the Log. Some will fail fatally and not generate any HLSL code, some will generate bad code that then does not compile. If it's the latter we can easily hand-fix the ones you need to get you going. Please post the shaders in the 3Dmigoto thread and we'll take a look.
helifax said:Hi guys,

Don't really know where to post this but I am trying to find the shadow shaders for Mortal Kombat X.
I did find them both PS or VS. However when I dump them it also generates a sound like it failed.
Hitting F10 will give the same "fail" sound. I believe there are some decompiling issues with these shaders as it works for other shaders (in the game) if I want to dump them.

Let me know what I can do from my end so you can investigate this issue;))
Big Thx;))

Yep, take a look at the Log. Some will fail fatally and not generate any HLSL code, some will generate bad code that then does not compile. If it's the latter we can easily hand-fix the ones you need to get you going.

Please post the shaders in the 3Dmigoto thread and we'll take a look.

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 04/18/2015 10:07 PM   
[s]DarkStarSword, do you have any idea why my prime directive fix did not work in the pixel shader (comment#480)?[/s] Update: I tried DarkStarSwords recommendation in #482 & it fixed the effect. I then tried adding the prime directive in the VS to correct o3. o3 was being set by r1, so I disabled the original code & copied r1 into r0, then applied stereo fix on r0. I did this right at the end of the shader as shown by Bob in tutorial#6. But this does not affect the output. So the key here is the placement of the stereo fix. But, shouldn't my version affect the shader in some way since o3 is being set at the end? Update 2: I've also noticed that only texLDL command works & not texLD. Why is that so? [code] //Shader for AO effects? vs_3_0 // Converted from vs_2_0 with DarkStarSword's shadertool.py def c19, 0.5, 1, 0, 0 def c199, 0, 1, 0.0625, 0.5 dcl_2d s0 //Helix's sampler dcl_position v0 dcl_normal v1 dcl_texcoord v2 dcl_texcoord o0 dcl_texcoord1 o1 dcl_texcoord2 o2 dcl_position o3 mul r1.xyz, v1, c17.w dp3 r2.w, r1, c5 dp3 r0.x, r1, c4 dp3 r0.z, r1, c6 mov r0.y, r2.w mul r1, r0.xyzz, r0.yzzx mov r0.w, c19.y dp4 r2.z, r0, c12 dp4 r2.y, r0, c11 dp4 r2.x, r0, c10 mul r0.y, r2.w, r2.w dp4 r3.z, r1, c15 dp4 r3.y, r1, c14 dp4 r3.x, r1, c13 dp4 r1.w, v0, c3 dp4 r1.z, v0, c2 mad r0.x, r0, r0, -r0.y add r3.xyz, r2, r3 mul r2.xyz, r0.x, c16 dp4 r1.x, v0, c0 dp4 r1.y, v0, c1 mul r0.xyz, r1.xyww, c19.x mul r0.y, r0, c8.x add o2.xyz, r3, r2 mad o1.xy, r0.z, c9.zwzw, r0 //mov o3, r1 //disables the effect while breaking some other things. mov o1.zw, r1 mad o0.xy, v2, c18, c18.zwzw mov r0, r1 // At this point r0 is the output position, correctly placed, but without stereo. //// Fetch the Separation & Convergence using the Helix NVapi trick. c199.z does that. texld r3, c199.z, s0 //use Helix sampler s0. Now r3.x = Separation, r3.y = Convergence add r3.w, r0.w, -r3.y // (W - Convergence) store in r3.w mul r3.z, r3.x, r3.w // Separation* (W-Convergence) store in r3.z add r0.x, r0.x, r3.z // Xold + Separation*(W-Convergence) mov o3, r0 // approximately 28 instruction slots used [/code]
DarkStarSword, do you have any idea why my prime directive fix did not work in the pixel shader (comment#480)?

Update: I tried DarkStarSwords recommendation in #482 & it fixed the effect. I then tried adding the prime directive in the VS to correct o3. o3 was being set by r1, so I disabled the original code & copied r1 into r0, then applied stereo fix on r0. I did this right at the end of the shader as shown by Bob in tutorial#6. But this does not affect the output. So the key here is the placement of the stereo fix. But, shouldn't my version affect the shader in some way since o3 is being set at the end?

Update 2: I've also noticed that only texLDL command works & not texLD. Why is that so?

//Shader for AO effects?

vs_3_0 // Converted from vs_2_0 with DarkStarSword's shadertool.py
def c19, 0.5, 1, 0, 0

def c199, 0, 1, 0.0625, 0.5
dcl_2d s0 //Helix's sampler

dcl_position v0
dcl_normal v1
dcl_texcoord v2

dcl_texcoord o0
dcl_texcoord1 o1
dcl_texcoord2 o2
dcl_position o3

mul r1.xyz, v1, c17.w
dp3 r2.w, r1, c5
dp3 r0.x, r1, c4
dp3 r0.z, r1, c6
mov r0.y, r2.w
mul r1, r0.xyzz, r0.yzzx
mov r0.w, c19.y
dp4 r2.z, r0, c12
dp4 r2.y, r0, c11
dp4 r2.x, r0, c10
mul r0.y, r2.w, r2.w
dp4 r3.z, r1, c15
dp4 r3.y, r1, c14
dp4 r3.x, r1, c13
dp4 r1.w, v0, c3
dp4 r1.z, v0, c2
mad r0.x, r0, r0, -r0.y
add r3.xyz, r2, r3
mul r2.xyz, r0.x, c16
dp4 r1.x, v0, c0
dp4 r1.y, v0, c1
mul r0.xyz, r1.xyww, c19.x
mul r0.y, r0, c8.x
add o2.xyz, r3, r2
mad o1.xy, r0.z, c9.zwzw, r0
//mov o3, r1 //disables the effect while breaking some other things.
mov o1.zw, r1
mad o0.xy, v2, c18, c18.zwzw

mov r0, r1
// At this point r0 is the output position, correctly placed, but without stereo.
//// Fetch the Separation & Convergence using the Helix NVapi trick. c199.z does that.
texld r3, c199.z, s0 //use Helix sampler s0. Now r3.x = Separation, r3.y = Convergence
add r3.w, r0.w, -r3.y // (W - Convergence) store in r3.w
mul r3.z, r3.x, r3.w // Separation* (W-Convergence) store in r3.z
add r0.x, r0.x, r3.z // Xold + Separation*(W-Convergence)
mov o3, r0

// approximately 28 instruction slots used

Posted 04/21/2015 05:56 AM   
In some games I have the problem that the HUD of helixmod's debug dll is not visible (e.g. Dead or Alive 5). Cycling through shaders, reloading the shaders etc. is working but I can't see the HUD information. In some cases alt+tabbing to desktop and back to the game helps but not with every game. As a workaround I start the game with TexMod and the HUD of TexMod also makes the HUD of Helixmod visible. But TexMod has some other issues (the game's exe has to be started directly, not with a launcher, etc.). Is there another solution for games with the debugger HUD not showing up? Edit: Just tried another workaround and in the case of Dead or Alive 5 it helped. I use 2 monitors, start the game with higher resolution than my main screen (1920x1080 instead of 1680x1050) and the HUD is visible. Strange...
In some games I have the problem that the HUD of helixmod's debug dll is not visible (e.g. Dead or Alive 5). Cycling through shaders, reloading the shaders etc. is working but I can't see the HUD information. In some cases alt+tabbing to desktop and back to the game helps but not with every game. As a workaround I start the game with TexMod and the HUD of TexMod also makes the HUD of Helixmod visible. But TexMod has some other issues (the game's exe has to be started directly, not with a launcher, etc.). Is there another solution for games with the debugger HUD not showing up?

Edit: Just tried another workaround and in the case of Dead or Alive 5 it helped. I use 2 monitors, start the game with higher resolution than my main screen (1920x1080 instead of 1680x1050) and the HUD is visible. Strange...

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 04/21/2015 12:26 PM   
@3d4dd: Try using UseEndScene=true That changes when it gets drawn in the pipeline and sometimes makes it visible.
@3d4dd: Try using UseEndScene=true

That changes when it gets drawn in the pipeline and sometimes makes it visible.

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 04/22/2015 01:45 AM   
For DoA5 UseEndScene=true didn't help. But I discovered the reason why the HUD didn't work for this game with some resolutions: the game renders only in 16:9. If I use resolutions with this ratio (720p or 1080p) the HUD is visible. When I use other resolutions (e.g. 1680x1050 = 16:10) the game has black bars that also seem to cover/deactivate the debug HUD.
For DoA5 UseEndScene=true didn't help. But I discovered the reason why the HUD didn't work for this game with some resolutions: the game renders only in 16:9. If I use resolutions with this ratio (720p or 1080p) the HUD is visible. When I use other resolutions (e.g. 1680x1050 = 16:10) the game has black bars that also seem to cover/deactivate the debug HUD.

My original display name is 3d4dd - for some reason Nvidia changed it..?!

Posted 04/22/2015 10:26 AM   
Bob/DSS can you please tell me why in the shader in comment#486 texldl command works & not texld?
Bob/DSS can you please tell me why in the shader in comment#486 texldl command works & not texld?

Posted 04/22/2015 11:13 AM   
The texld instruction only works in pixel shaders - vertex shaders have to use texldl: https://msdn.microsoft.com/en-us/library/windows/desktop/bb172938(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb219854(v=vs.85).aspx Does that also explain the lack of any effect you mentioned in update 1?
The texld instruction only works in pixel shaders - vertex shaders have to use texldl:


https://msdn.microsoft.com/en-us/library/windows/desktop/bb172938(v=vs.85).aspx

https://msdn.microsoft.com/en-us/library/windows/desktop/bb219854(v=vs.85).aspx


Does that also explain the lack of any effect you mentioned in update 1?

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

Posted 04/22/2015 10:40 PM   
I would like make a better 3d experiencie with F12011 Codemasters using Helix Mod Well, there are only two issues, and i think that there's not hard to fix them First problem is shadows and the second problem is with some postprocessing effects. Shadows in game have bad convergence and position and i would like correct this. The shadow problematic shader is "70CF5B29" number VS944. It's a vectrex shader And this is the code: [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // float4 screenProj; // // // Registers: // // Name Reg Size // ------------ ----- ---- // screenProj c0 1 // vs_3_0 def c1, 0.5, -0.5, -1, -90 def c2, 1, 0, 0, 0 def c220, 0.15, 0, 0.0625, 0 // I added this line dcl_2d s0 // I added this line dcl_position v0 dcl_position o0 dcl_texcoord o1 mad o1.xy, v0, c1, c1.x mul o1.zw, c0.xyxy, v0.xyxy mov r0.zw, c1 add r0.x, r0.z, c0.z mad r0.x, r0.x, r0.w, c0.w rcp r0.x, r0.x mul o0.z, r0.x, -c1.w mad o0.xyw, v0.xyzx, c2.xxzy, c2.yyzx // I add next lines texldl r1, c220.z, s0 mul r1.x, r1.x, -c220.x add r3.x, r3.x, -r1.x mov o0, r3 // End modification // approximately 8 instruction slots used[/code] Then i have tried a lot of things and changes... but none worked. :( I am a bit confused... how can i change the convergence of the shadows? Any clue? I would like to learn how to make 3D fixes for games Thank you in advance!
I would like make a better 3d experiencie with F12011 Codemasters using Helix Mod

Well, there are only two issues, and i think that there's not hard to fix them

First problem is shadows and the second problem is with some postprocessing effects. Shadows in game have bad convergence and position and i would like correct this.

The shadow problematic shader is "70CF5B29" number VS944. It's a vectrex shader

And this is the code:

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// Parameters:
//
// float4 screenProj;
//
//
// Registers:
//
// Name Reg Size
// ------------ ----- ----
// screenProj c0 1
//

vs_3_0
def c1, 0.5, -0.5, -1, -90
def c2, 1, 0, 0, 0

def c220, 0.15, 0, 0.0625, 0 // I added this line
dcl_2d s0 // I added this line

dcl_position v0
dcl_position o0
dcl_texcoord o1
mad o1.xy, v0, c1, c1.x
mul o1.zw, c0.xyxy, v0.xyxy
mov r0.zw, c1
add r0.x, r0.z, c0.z
mad r0.x, r0.x, r0.w, c0.w
rcp r0.x, r0.x
mul o0.z, r0.x, -c1.w
mad o0.xyw, v0.xyzx, c2.xxzy, c2.yyzx

// I add next lines
texldl r1, c220.z, s0
mul r1.x, r1.x, -c220.x
add r3.x, r3.x, -r1.x
mov o0, r3
// End modification


// approximately 8 instruction slots used


Then i have tried a lot of things and changes... but none worked. :(


I am a bit confused... how can i change the convergence of the shadows? Any clue?

I would like to learn how to make 3D fixes for games

Thank you in advance!

Posted 04/25/2015 09:46 PM   
Don't start with a shadow fix - that's one of the hardest types of effects to fix, especially if there is no example of another game using the same engine. If you wanted to ignore this advice and try anyway you will probably need to find the pixel shader(s) for the effect, but seriously - wait until you've got a *really* good handle on fixing easier stuff before you even consider looking at shadows. What was the other issue you mentioned? It might be a better place to start.
Don't start with a shadow fix - that's one of the hardest types of effects to fix, especially if there is no example of another game using the same engine. If you wanted to ignore this advice and try anyway you will probably need to find the pixel shader(s) for the effect, but seriously - wait until you've got a *really* good handle on fixing easier stuff before you even consider looking at shadows.

What was the other issue you mentioned? It might be a better place to start.

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

Posted 04/26/2015 03:22 AM   
Thank you for your answer and your advice DarkStarSword I know that shadows are hard to fix in many games... in some games like GTA IV near impossible. But... I think the shadow shader in this particular game is not hard to fix. Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :( Another issues are: - The reflection of the environment on the wet track. Very little wrong convergence. - Tire smoke when you break hard. Bad convergence. But this problem perhaps is difficult to fix because you cannot pause the game. Disable shaders is very easy... but fix shaders seems much more complicated.
Thank you for your answer and your advice DarkStarSword

I know that shadows are hard to fix in many games... in some games like GTA IV near impossible. But...
I think the shadow shader in this particular game is not hard to fix.

Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :(

Another issues are:

- The reflection of the environment on the wet track. Very little wrong convergence.
- Tire smoke when you break hard. Bad convergence. But this problem perhaps is difficult to fix because you cannot pause the game.

Disable shaders is very easy... but fix shaders seems much more complicated.

Posted 04/27/2015 02:53 AM   
[quote="Edgarovski"]Thank you for your answer and your advice DarkStarSword I know that shadows are hard to fix in many games... in some games like GTA IV near impossible. But... I think the shadow shader in this particular game is not hard to fix.[/quote]Not all things that look easy actually are, and from a simple mistake you made in the VS you posted above (used an uninitialised register r3), I don't think you are ready to attempt a shadow fix... Find me the pixel shaders (there may be two or more) and post a 3D screenshot and I'll be in a better position to guestimate the likely difficulty. [quote]Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :([/quote]That is strange, but I think I may have seen similar things on occasion but could never reproduce it so I wasn't sure. It might be an indication that trying out different profiles may help: http://helixmod.blogspot.com.au/2013/03/how-to-change-3d-vision-profile-and.html [quote]Another issues are: - The reflection of the environment on the wet track. Very little wrong convergence.[/quote]Reflections vary in difficulty. Depending on how they are done I'd say they can be anywhere from moderate (e.g. some Unity games where it's the same cause as water halo issues) to freaking difficult (e.g. Miasmata, Far Cry 4) [quote]- Tire smoke when you break hard. Bad convergence. But this problem perhaps is difficult to fix because you cannot pause the game.[/quote]Any chance you can grab a 3D screenshot of this so I can see what you mean? Smoke effects commonly have halo type issues, which are often pretty easy to fix (and sometimes can be fixed by profile), so this might actually be the best one to start on. Edit: Unless you can't hunt down the shader, which might be tricky if you can't pause the game, and can be a nightmare if this is one of the games that helix mod likes to crash in. [quote]Disable shaders is very easy... but fix shaders seems much more complicated.[/quote]Yep :)
Edgarovski said:Thank you for your answer and your advice DarkStarSword

I know that shadows are hard to fix in many games... in some games like GTA IV near impossible. But...
I think the shadow shader in this particular game is not hard to fix.
Not all things that look easy actually are, and from a simple mistake you made in the VS you posted above (used an uninitialised register r3), I don't think you are ready to attempt a shadow fix... Find me the pixel shaders (there may be two or more) and post a 3D screenshot and I'll be in a better position to guestimate the likely difficulty.

Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :(
That is strange, but I think I may have seen similar things on occasion but could never reproduce it so I wasn't sure. It might be an indication that trying out different profiles may help:
http://helixmod.blogspot.com.au/2013/03/how-to-change-3d-vision-profile-and.html

Another issues are:

- The reflection of the environment on the wet track. Very little wrong convergence.
Reflections vary in difficulty. Depending on how they are done I'd say they can be anywhere from moderate (e.g. some Unity games where it's the same cause as water halo issues) to freaking difficult (e.g. Miasmata, Far Cry 4)

- Tire smoke when you break hard. Bad convergence. But this problem perhaps is difficult to fix because you cannot pause the game.
Any chance you can grab a 3D screenshot of this so I can see what you mean? Smoke effects commonly have halo type issues, which are often pretty easy to fix (and sometimes can be fixed by profile), so this might actually be the best one to start on.

Edit: Unless you can't hunt down the shader, which might be tricky if you can't pause the game, and can be a nightmare if this is one of the games that helix mod likes to crash in.

Disable shaders is very easy... but fix shaders seems much more complicated.
Yep :)

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

Posted 04/27/2015 06:51 AM   
  33 / 87    
Scroll To Top