Are you able to fix Company of Heroes 2 for me?
  2 / 5    
[quote="tehace"]Im still puzzled as to why proposing a compensation for a fix nobody else care to make for themselves is a bad thing. I get it people dont do it for the money, and they dedicate their free time for doing so.[/quote] While I understand your position, at the core there is nothing wrong in your premise. From past discussions, the request for money exchange for fixes has generally not been accepted in this environment, it is really that simple. The best compensation anyone can do is give back to the community by either making an effort to learn the basics in fixing or contributing with tweaks or guides to get games working in 3D. bo3b and helifax have made videos for us less experienced individuals and you will surprise yourself if you make an effort. I've also seen non fixers providing constructive feedback to the authors with problems on the latest fixes by the way of saved files and specific information that uncover shader problems.
tehace said:Im still puzzled as to why proposing a compensation for a fix nobody else care to make for themselves is a bad thing. I get it people dont do it for the money, and they dedicate their free time for doing so.


While I understand your position, at the core there is nothing wrong in your premise. From past discussions, the request for money exchange for fixes has generally not been accepted in this environment, it is really that simple. The best compensation anyone can do is give back to the community by either making an effort to learn the basics in fixing or contributing with tweaks or guides to get games working in 3D. bo3b and helifax have made videos for us less experienced individuals and you will surprise yourself if you make an effort. I've also seen non fixers providing constructive feedback to the authors with problems on the latest fixes by the way of saved files and specific information that uncover shader problems.

#16
Posted 11/13/2015 04:26 PM   
Those lessons are using dx9helixmod, how can I use those to fix dx11 game? I found this https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture. http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/ I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means. Than there is 'fix the marked shader' section where Im completely lost. It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number." I have found >>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef and I have this at the very end > FAILED to copy Marked shader to ShaderFixes HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with Fullscreen = 0 Target = 00000000 returns 0 second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest." My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho. Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step. The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :) I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt
Those lessons are using dx9helixmod, how can I use those to fix dx11 game?

I found this
https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders

I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture.
http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/

I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means.

Than there is 'fix the marked shader' section where Im completely lost.
It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number."

I have found
>>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef

and I have this at the very end
> FAILED to copy Marked shader to ShaderFixes
HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with
Fullscreen = 0
Target = 00000000
returns 0

second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest."

My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho.

Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step.

The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :)

I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D

edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#17
Posted 11/13/2015 06:42 PM   
[quote="tehace"]Those lessons are using dx9helixmod, how can I use those to fix dx11 game? I found this https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture. http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/ I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means. Than there is 'fix the marked shader' section where Im completely lost. It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number." I have found >>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef and I have this at the very end > FAILED to copy Marked shader to ShaderFixes HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with Fullscreen = 0 Target = 00000000 returns 0 second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest." My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho. Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step. The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :) I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt[/quote] Everyone else is correct - no one will take money, it's just the way it is. For what it's worth, I did have a quick look at this ages ago, but the version of 3DMigoto at the time had lots of decompiler issues etc so it was impossible to work with. The wrapper has come on leaps and bounds since then so I am not sure what the feasibility of fixing is nowadays. However, I seem to remember from what I could shader dump, the patterns were not standard, so this may not be the best game to "get into" fixing I'm afraid. That being said, I personally have no intention of fixing it - I just don't play these kinds of games. I have "come out of hiding" this week because of Fallout 4, but otherwise I am swamped doing a part-time MBA and am not even playing games let alone fixing them. There are lots of modders now doing great work on these fixes - focus on "partnership" rather than "payment" and you are more likely to get traction I think.
tehace said:Those lessons are using dx9helixmod, how can I use those to fix dx11 game?

I found this

https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders


I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture.

http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/


I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means.

Than there is 'fix the marked shader' section where Im completely lost.
It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number."

I have found
>>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef

and I have this at the very end
> FAILED to copy Marked shader to ShaderFixes
HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with
Fullscreen = 0
Target = 00000000
returns 0

second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest."

My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho.

Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step.

The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :)

I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D

edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt


Everyone else is correct - no one will take money, it's just the way it is. For what it's worth, I did have a quick look at this ages ago, but the version of 3DMigoto at the time had lots of decompiler issues etc so it was impossible to work with. The wrapper has come on leaps and bounds since then so I am not sure what the feasibility of fixing is nowadays. However, I seem to remember from what I could shader dump, the patterns were not standard, so this may not be the best game to "get into" fixing I'm afraid.

That being said, I personally have no intention of fixing it - I just don't play these kinds of games. I have "come out of hiding" this week because of Fallout 4, but otherwise I am swamped doing a part-time MBA and am not even playing games let alone fixing them. There are lots of modders now doing great work on these fixes - focus on "partnership" rather than "payment" and you are more likely to get traction I think.

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

#18
Posted 11/13/2015 07:06 PM   
Anybody knows what this is? http://photos.3dvisionlive.com/tehace/image/56463505e7e5646877000178/ http://photos.3dvisionlive.com/tehace/image/564634f4e7e56474070002d6/

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#19
Posted 11/13/2015 07:10 PM   
mike_ar69 I think that with the recent topics like "Unearned Expectations in the 3D Community" I've been misunderstood a bit here, as I said earlier Im not going to be 'mad' nobody wants to fix this game, neither I expect people to jump on it straight away. It was a loosely proposition and kind of an easy way out for me. Insulting anybody was never my intention so Im sorry if anybody felt that way. It was you who have fixed the "- Floaty 2D ground textures" in Rome2, any tips on where should I start?
mike_ar69 I think that with the recent topics like "Unearned Expectations in the 3D Community" I've been misunderstood a bit here, as I said earlier Im not going to be 'mad' nobody wants to fix this game, neither I expect people to jump on it straight away. It was a loosely proposition and kind of an easy way out for me.

Insulting anybody was never my intention so Im sorry if anybody felt that way.

It was you who have fixed the "- Floaty 2D ground textures" in Rome2, any tips on where should I start?

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#20
Posted 11/13/2015 07:57 PM   
[quote="tehace"]Insulting anybody was never my intention so Im sorry if anybody felt that way. [/quote] Nah, I wouldn't worry about it. I really doubt anyone was offended. mike_ar69 has made a great point about "partnership" or collaborative efforts. I can assure you that disabling shaders is something anyone can do and this may be enough to get COH2 at the very least playable. Getting started can seem daunting but bo3d shader school for hacking is a great place to start! I have done this myself and have fixed and tweak a few games myself because those were the games I really wanted to play in 3D. I posted my results back here or on the Helixmod blog and I also found out that one thing leads to another. As I mentioned earlier, there is nothing wrong with your premise about money but when you step back an think about it, money = expectation. This community would be very different if money was involved. Good luck with COH2.
tehace said:Insulting anybody was never my intention so Im sorry if anybody felt that way.


Nah, I wouldn't worry about it. I really doubt anyone was offended. mike_ar69 has made a great point about "partnership" or collaborative efforts. I can assure you that disabling shaders is something anyone can do and this may be enough to get COH2 at the very least playable. Getting started can seem daunting but bo3d shader school for hacking is a great place to start! I have done this myself and have fixed and tweak a few games myself because those were the games I really wanted to play in 3D. I posted my results back here or on the Helixmod blog and I also found out that one thing leads to another. As I mentioned earlier, there is nothing wrong with your premise about money but when you step back an think about it, money = expectation. This community would be very different if money was involved. Good luck with COH2.

#21
Posted 11/13/2015 08:19 PM   
[quote="tehace"]mike_ar69 I think that with the recent topics like "Unearned Expectations in the 3D Community" I've been misunderstood a bit here, as I said earlier Im not going to be 'mad' nobody wants to fix this game, neither I expect people to jump on it straight away. It was a loosely proposition and kind of an easy way out for me. Insulting anybody was never my intention so Im sorry if anybody felt that way. It was you who have fixed the "- Floaty 2D ground textures" in Rome2, any tips on where should I start?[/quote] That was a while ago... All I can suggest for now is that you have a look in the shaders for that fix, and find the shaders that have "ground textures" or something at the top of the files that indicates what they are (might be decals, I can't remember). Oftentimes with these floaty effects you need to first find a VS and correct that to make the textures at screen depth, then find a PS and correct them in there.
tehace said:mike_ar69 I think that with the recent topics like "Unearned Expectations in the 3D Community" I've been misunderstood a bit here, as I said earlier Im not going to be 'mad' nobody wants to fix this game, neither I expect people to jump on it straight away. It was a loosely proposition and kind of an easy way out for me.

Insulting anybody was never my intention so Im sorry if anybody felt that way.

It was you who have fixed the "- Floaty 2D ground textures" in Rome2, any tips on where should I start?

That was a while ago... All I can suggest for now is that you have a look in the shaders for that fix, and find the shaders that have "ground textures" or something at the top of the files that indicates what they are (might be decals, I can't remember). Oftentimes with these floaty effects you need to first find a VS and correct that to make the textures at screen depth, then find a PS and correct them in there.

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

#22
Posted 11/13/2015 11:00 PM   
Recently, I have been working on a game I have managed to fix. It was a previous fix that needed updating and as I knew if I wanted a fix I would probably have to do it myself. I just jumped in without anything than a solid general I.T knowledge. I am not a programmer. The lessons and wiki are truly are the best place to start, and yes. I got stuck. But because I showed an effort in working on this, paying with my own time, I was immediately assisted by the community here and I've eventually been able to fix it. (I still have one more texture to find, before I can release.) I in the past had toyed around with offering money for fixes as well, but the reality is it's much better people are giving the incentive to try and do it themselves it benefits the entire community having more trained shader hackers to fix games. Jump in you might be surprised... That said, granted Company of heroes is probably not the best game to start with.
Recently, I have been working on a game I have managed to fix. It was a previous fix that needed updating and as I knew if I wanted a fix I would probably have to do it myself. I just jumped in without anything than a solid general I.T knowledge. I am not a programmer.

The lessons and wiki are truly are the best place to start, and yes. I got stuck. But because I showed an effort in working on this, paying with my own time, I was immediately assisted by the community here and I've eventually been able to fix it. (I still have one more texture to find, before I can release.)

I in the past had toyed around with offering money for fixes as well, but the reality is it's much better people are giving the incentive to try and do it themselves it benefits the entire community having more trained shader hackers to fix games. Jump in you might be surprised...

That said, granted Company of heroes is probably not the best game to start with.

i7-4790K CPU 4.8Ghz stable overclock.
16 GB RAM Corsair
EVGA 1080TI SLI
Samsung SSD 840Pro
ASUS Z97-WS
3D Surround ASUS Rog Swift PG278Q(R), 2x PG278Q (yes it works)
Obutto R3volution.
Windows 10 pro 64x (Windows 7 Dual boot)

#23
Posted 11/14/2015 01:08 AM   
[quote="tehace"]Those lessons are using dx9helixmod, how can I use those to fix dx11 game? I found this https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture. http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/ I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means. Than there is 'fix the marked shader' section where Im completely lost. It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number." I have found >>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef and I have this at the very end > FAILED to copy Marked shader to ShaderFixes HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with Fullscreen = 0 Target = 00000000 returns 0 second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest." My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho. Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step. The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :) I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt[/quote] Yes, sorry for the stale documentation. The wiki.bo3b.net all starts with HelixMod for DX9 games, as that was the primary interest last year. The focus has shifted recently to a lot more people using 3Dmigoto. I expect to update this at some point for using 3Dmigoto. But for the time being, just ask here, and we'll fill in the gaps. The basic principles are all the same though, once you grasp the ideas. So, for example, the wiki instructions say to copy the file from the ShaderDumps to ShaderFixes. In DX11 and 3Dmigoto, we simplified this a bit, so that there is a ShaderCache that is unused, and ShaderFixes, where we automatically copy the file for you upon Mark, as a convenience. The upshot is that 3Dmigoto is quite a bit easier to use. While CoH2 is an unknown game engine, and therefore harder to fix than your average game, if you would be happy enough with a disabled effect- disabling shaders is super easy on any game. For your shader 662ee2ed4ba8d6ef-ps_replace.txt, at the bottom of the code, right before the "return;" statement, put these: [code] o2.xyzw = v0.zzzz; // Disable effect. o0=0; o1=0; o2=0; return;[/code] That tells the compiler to generate code that blanks out this shader, makes the outputs zero. Same idea as HelixMod, slightly different syntax. Give that a try, and reload the game, with that patched shader in the ShaderFixes folder.
tehace said:Those lessons are using dx9helixmod, how can I use those to fix dx11 game?

I found this

https://github.com/bo3b/3Dmigoto/wiki/Using-3Dmigoto-to-find-and-fix-shaders


I've downloaded the 1.2.7 version and copied the 32bit version to my coh directory. Than I found the ground as PS: 10/34 or at least I hope so as it 'highlights' the whole ground texture.

http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/


I assumed PS means pixelshader so I hit 3 to 'mark' it whatever that means.

Than there is 'fix the marked shader' section where Im completely lost.
It starts with "In the game executable directory find the d3d11_log.txt. Search in the log to find 'marked', and copy the shader hash number."

I have found
>>>> pixel shader marked: pixel shader hash = 662ee2ed4ba8d6ef

and I have this at the very end
> FAILED to copy Marked shader to ShaderFixes
HackerDXGISwapChain::SetFullscreenState(class HackerDXGISwapChain@1F181740) called with
Fullscreen = 0
Target = 00000000
returns 0

second point is "Find the shader in question in the ShaderCache folder. Pasting hash into the Find box is easiest."

My ShaderCache folder is empty... I have two files 662ee2ed4ba8d6ef-ps_replace.txt and 662ee2ed4ba8d6ef-ps.jps in ShaderFixes folder tho.

Considering the next part is to "Copy the version that ends with _replace.txt to the ShaderFixes folder. That version will now supersede the cache version." Im not sure if this is an issue as it seem Im already at this step.

The next one is "Edit the file to fix the shader. This is where you apply your superpower - Superpowers available to all after study of how 3D works." My problem here is I dont have the superpower :)

I have found this "Later I'll try to describe how to fix(not disable) shaders, but it's required basic knowledges of shader programming." and since I cant disable the ground and I have close to zero programing knowledge I guess im going to be stuck at this point forever :D

edit: here is the file http://thc333.com/662ee2ed4ba8d6ef-ps_replace.txt


Yes, sorry for the stale documentation. The wiki.bo3b.net all starts with HelixMod for DX9 games, as that was the primary interest last year. The focus has shifted recently to a lot more people using 3Dmigoto. I expect to update this at some point for using 3Dmigoto. But for the time being, just ask here, and we'll fill in the gaps.

The basic principles are all the same though, once you grasp the ideas. So, for example, the wiki instructions say to copy the file from the ShaderDumps to ShaderFixes. In DX11 and 3Dmigoto, we simplified this a bit, so that there is a ShaderCache that is unused, and ShaderFixes, where we automatically copy the file for you upon Mark, as a convenience. The upshot is that 3Dmigoto is quite a bit easier to use.

While CoH2 is an unknown game engine, and therefore harder to fix than your average game, if you would be happy enough with a disabled effect- disabling shaders is super easy on any game.

For your shader 662ee2ed4ba8d6ef-ps_replace.txt, at the bottom of the code, right before the "return;" statement, put these:

o2.xyzw = v0.zzzz;

// Disable effect.
o0=0;
o1=0;
o2=0;

return;


That tells the compiler to generate code that blanks out this shader, makes the outputs zero. Same idea as HelixMod, slightly different syntax.

Give that a try, and reload the game, with that patched shader in the ShaderFixes folder.

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

#24
Posted 11/14/2015 03:48 AM   
As bo3b has pointed out, the theory behind shader fixing is similar between helixmod and 3dmigoto, and learning helixmod will give you the understanding you need to work with 3dmigoto. As proof, I have fixed a game with 3dmigoto, after learning with the school and helixmod. I did get plenty help from people here to allow me to do this, but the lessons helped me understand the theory behind what I was doing. I've never done any programming in my life, so I know you can learn it too if you're willing to put in the time. Good work on getting started!
As bo3b has pointed out, the theory behind shader fixing is similar between helixmod and 3dmigoto, and learning helixmod will give you the understanding you need to work with 3dmigoto.

As proof, I have fixed a game with 3dmigoto, after learning with the school and helixmod. I did get plenty help from people here to allow me to do this, but the lessons helped me understand the theory behind what I was doing. I've never done any programming in my life, so I know you can learn it too if you're willing to put in the time. Good work on getting started!

#25
Posted 11/14/2015 04:40 AM   
So I guess that disabling the shader has something to do with the previous out float4 o0 : SV_Target0, out float4 o1 : SV_Target1, out float4 o2 : SV_Target2) as it looks im disabling those o0 o1 o2 unfortunately I cant disable this shader as it seems its the whole ground, the game just looses it and all I can see is the void, so it looks like this - http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/ its not grey background its a void :( this is cool - https://forums.geforce.com/default/topic/896196/3d-vision/-simplified-guide-quick-n-easy-shader-disabling-fixing-static-objects-depth-if-rendered-wrong-/ but its lacking part3 about fixing yet.
So I guess that disabling the shader has something to do with the previous

out float4 o0 : SV_Target0,
out float4 o1 : SV_Target1,
out float4 o2 : SV_Target2)

as it looks im disabling those o0 o1 o2

unfortunately I cant disable this shader as it seems its the whole ground, the game just looses it and all I can see is the void, so it looks like this - http://photos.3dvisionlive.com/tehace/image/56462c09e7e564437700019c/ its not grey background its a void :(

this is cool - https://forums.geforce.com/default/topic/896196/3d-vision/-simplified-guide-quick-n-easy-shader-disabling-fixing-static-objects-depth-if-rendered-wrong-/ but its lacking part3 about fixing yet.

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#26
Posted 11/14/2015 12:13 PM   
That's a pretty good start. You should try to disable the shadows now, and you'll have something that looks fairly decent (even if there's no ground). The other stuff isn't perfect, but it's not eye-bleedingly bad. After that, maybe you could post the shader for the ground, and someone might be able to offer you some suggestions for where you can start experimenting. Good work :)
That's a pretty good start. You should try to disable the shadows now, and you'll have something that looks fairly decent (even if there's no ground). The other stuff isn't perfect, but it's not eye-bleedingly bad.

After that, maybe you could post the shader for the ground, and someone might be able to offer you some suggestions for where you can start experimenting.

Good work :)

#27
Posted 11/14/2015 03:40 PM   
If you open the sysconfig.lua there are additional settings you're not able to set off in the menu, one of them is -- Enable shadows (3=high, 2=medium, 1=low, 0=off) { setting = "Shadows",value = 0,valueType = valueTypeInt }, so the shadows can be turned off by editing this file hence why Im not sure if there is a need for a 'fix' for them since I would at best be able to do the same meaning to disable them not fix them to render properly. I have dumped some other shaders just to see how they look like and that ground texture is the biggest one I've seen so far, some like unit icons are really small totaling 23 lines of code, thats like nothing compared to that massive 226 lines for the ground ;/ guess thats why nobody bothered fixing it as I guess you would have to reverse engineer it first to understand how does it render it and than find the parameter that is causing its being rendered at the wrong depth and fix it... edit: the other thing that bothers me is "F10 TO RELOAD SHADER. You should hear a high pitch beep and your shader should be fixed! A low pitch beep means you have gone wrong. Compare the code above with yours." whenever I hit f10 I hear the low pitch beep even prior to trying to edit any of the files.
If you open the sysconfig.lua there are additional settings you're not able to set off in the menu, one of them is

-- Enable shadows (3=high, 2=medium, 1=low, 0=off)
{ setting = "Shadows",value = 0,valueType = valueTypeInt },

so the shadows can be turned off by editing this file hence why Im not sure if there is a need for a 'fix' for them since I would at best be able to do the same meaning to disable them not fix them to render properly.

I have dumped some other shaders just to see how they look like and that ground texture is the biggest one I've seen so far, some like unit icons are really small totaling 23 lines of code, thats like nothing compared to that massive 226 lines for the ground ;/ guess thats why nobody bothered fixing it as I guess you would have to reverse engineer it first to understand how does it render it and than find the parameter that is causing its being rendered at the wrong depth and fix it...

edit: the other thing that bothers me is "F10 TO RELOAD SHADER. You should hear a high pitch beep and your shader should be fixed! A low pitch beep means you have gone wrong. Compare the code above with yours." whenever I hit f10 I hear the low pitch beep even prior to trying to edit any of the files.

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#28
Posted 11/14/2015 04:32 PM   
[code] cbuffer GlobalBuffer : register(b0) { float4x4 View : packoffset(c0); float4x4 Projection : packoffset(c4); float4x4 InvViewProj : packoffset(c8); float3 EyePosition : packoffset(c12) = float3(0,0,0); float3 DirLight0_Dir : packoffset(c13) = float3(-0.577000022,-0.577000022,0.577000022); float4 DirLight0_Diffuse : packoffset(c14) = float4(1,1,1,1); float4 PointLightActive : packoffset(c15) = float4(0,0,0,0); float4 PointLight0_Position_AttenStart : packoffset(c16) = float4(0,0,0,10000); float4 PointLight0_Diffuse_AttenInvRange : packoffset(c17) = float4(1,1,1,1); float4 PointLight1_Position_AttenStart : packoffset(c18) = float4(0,0,0,10000); float4 PointLight1_Diffuse_AttenInvRange : packoffset(c19) = float4(1,1,1,1); float4 PointLight2_Position_AttenStart : packoffset(c20) = float4(0,0,0,10000); float4 PointLight2_Diffuse_AttenInvRange : packoffset(c21) = float4(1,1,1,1); float4 PointLight3_Position_AttenStart : packoffset(c22) = float4(0,0,0,10000); float4 PointLight3_Diffuse_AttenInvRange : packoffset(c23) = float4(1,1,1,1); float4 SHLight[7] : packoffset(c24) = float4(0,0,0,0); SamplerState compositorDiffuseSampler_s : register(s0); SamplerState compositorSpecularSampler_s : register(s1); SamplerState MuckDiffuseSampler_s : register(s2); SamplerState MuckNormalSampler_s : register(s3); SamplerState MuckSpecGlossSampler_s : register(s4); SamplerState TrackSampler_s : register(s5); Texture2D<float4> muckDiffuseTexture : register(t60); Texture2D<float4> muckNormalTexture : register(t61); Texture2D<float4> muckSpecGlossTexture : register(t62); Texture2D<float4> TerrainTrackTexture : register(t65); Texture2D<float4> compositorDiffuseTexture : register(t72); Texture2D<float4> compositorSpecularTexture : register(t73); Texture2D<float4> StereoParams : register(t125); Texture1D<float4> IniParams : register(t120); void main( float4 v0 : SV_Position0, float2 v1 : TEXCOORD0, float w1 : TEXCOORD3, float w1 : TEXCOORD4, float4 v2 : TEXCOORD1, float3 v3 : TEXCOORD2, out float4 o0 : SV_Target0, out float4 o1 : SV_Target1, out float4 o2 : SV_Target2) { float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9; uint4 bitmask, uiDest; float4 fDest; r0.xy = v3.xz; r0.z = 1; r1.x = dot(r0.xyz, cb0[73].xzwx); r1.y = dot(r0.xyz, cb0[74].xzwx); r0.x = dot(r0.xyz, cb0[76].xzwx); r0.xy = r1.xy / r0.xx; r0.xy = r0.xy * cb0[77].xyxx + cb0[77].zwzz; r1.xyzw = compositorDiffuseTexture.SampleLevel(compositorDiffuseSampler_s, r0.xy, 0).xyzw; r0.xyzw = compositorSpecularTexture.SampleLevel(compositorSpecularSampler_s, r0.xy, 0).xyzw; r0.xy = r0.xy * float2(2,2) + float2(-1,-1); r0.w = dot(r0.xy, r0.xy); r0.w = 1 + -r0.w; r0.w = sqrt(r0.w); r2.xyz = float3(1,-1,1) * v2.yxz; r3.xyz = r2.xyz * r0.xxx; r3.xyz = r0.www * v2.xyz + r3.xyz; r4.xyz = float3(1,-1,1) * v2.xzy; r0.xyw = r0.yyy * r4.xyz + r3.xyz; r1.w = dot(r0.xyw, r0.xyw); r1.w = rsqrt(r1.w); r0.xyw = r1.www * r0.xyw; r1.w = r0.z * r0.z; r2.w = sqrt(r0.z); r2.w = min(1, r2.w); r3.x = 0.5 < cb0[83].z; if (r3.x != 0) { r3.y = cb0[71].y * v3.z; r3.zw = v3.xx * cb0[71].xxxx + float2(0.5,0.5); r5.x = cb0[172].z; r5.yw = float2(0.5,0.5); r3.xz = r5.xy + r3.zy; r6.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.xz, 0).xyzw; r5.z = cb0[172].z; r3.xy = r5.zw + r3.wy; r3.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.xy, 0).xyzw; r3.yz = v3.xz * cb0[71].xxyx + float2(0,0.5); r5.xz = float2(0.5,0.5); r5.y = cb0[172].w; r5.xy = r5.xy + r3.yz; r7.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r5.xy, 0).xyzw; r5.w = cb0[172].w; r3.yz = r5.zw + r3.yz; r5.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.yz, 0).yzwx; r5.x = saturate(r6.x); r5.y = saturate(r3.x); r5.z = saturate(r7.x); r5.w = saturate(r5.w); r3.x = dot(r5.xyzw, float4(0.25,0.25,0.25,0.25)); r3.y = w1.x < 0.100000001; r3.z = 0.5 < cb0[173].x; r3.y = (int)r3.z | (int)r3.y; r3.w = w1.x * r3.x; r3.w = saturate(10 * r3.w); r4.w = -0.100000001 + w1.x; r4.w = saturate(-r4.w * 2.85714293 + 1); r4.w = r4.w * r3.x; r3.y = r3.y ? r3.w : r4.w; r6.xyz = float3(0,0,0) < cb0[170].xyzx; if (r6.x != 0) { r6.xw = v3.xz * cb0[70].xxxy + float2(0.5,0.5); r6.xw = cb0[71].zzzw * r6.xw; sincos(cb0[170].w, r7.x, r8.x); r9.x = -r7.x; r9.y = r8.x; r8.x = dot(r9.yx, r6.xw); r9.z = r7.x; r8.y = dot(r9.zy, r6.xw); r6.xw = r3.zz ? r8.xy : r6.xw; r6.xw = cb0[170].xxxx * r6.xw; r7.xyzw = muckDiffuseTexture.Sample(MuckDiffuseSampler_s, r6.xw).xyzw; r8.xyz = r7.xyz * r1.xyz; r9.xyz = r7.xyz + -r1.xyz; r9.xyz = r7.www * r9.xyz + r1.xyz; r7.xyz = -r1.xyz * r7.xyz + r9.xyz; r7.xyz = cb0[173].xxxx * r7.xyz + r8.xyz; r3.w = r7.w * r3.y; r7.xyz = r7.xyz + -r1.xyz; r1.xyz = r3.www * r7.xyz + r1.xyz; } r7.xyz = r1.xyz * r3.yyy; o1.xyz = r7.xyz * float3(-0.149999976,-0.149999976,-0.149999976) + r1.xyz; if (r6.y != 0) { r3.yw = v3.xz * cb0[70].xxxy + float2(0.5,0.5); r3.yw = cb0[71].zzzw * r3.yw; sincos(cb0[170].w, r6.x, r7.x); r8.x = -r6.x; r8.y = r7.x; r7.x = dot(r8.yx, r3.yw); r8.z = r6.x; r7.y = dot(r8.zy, r3.yw); r3.yw = r3.zz ? r7.xy : r3.yw; r3.yw = cb0[170].yyyy * r3.yw; r7.xyzw = muckNormalTexture.Sample(MuckNormalSampler_s, r3.yw).xyzw; r7.xy = r7.wy * float2(2,2) + float2(-1,-1); r3.y = dot(r7.xy, r7.xy); r3.y = 1 + -r3.y; r7.z = sqrt(abs(r3.y)); r3.y = dot(r7.xyz, r7.xyz); r3.y = rsqrt(r3.y); r6.xyw = r7.xyz * r3.yyy; r2.xyz = r6.xxx * r2.xyz; r2.xyz = r6.www * v2.xyz + r2.xyz; r2.xyz = r6.yyy * r4.xyz + r2.xyz; r3.y = dot(r2.xyz, r2.xyz); r3.y = rsqrt(r3.y); r2.xyz = r2.xyz * r3.yyy + -r0.xyw; r2.xyz = r3.xxx * r2.xyz + r0.xyw; r3.y = dot(r2.xyz, r2.xyz); r3.y = rsqrt(r3.y); r0.xyw = r3.yyy * r2.xyz; } r2.x = cb0[173].x < 0.5; r4.xy = r5.xy + -r5.zw; r4.z = -r4.x * r4.y + 1; r4.w = -r4.y; r2.y = dot(r4.xzw, r4.xzw); r2.y = rsqrt(r2.y); r2.z = 5 * r3.x; r2.z = min(0.800000012, r2.z); r3.y = saturate(5 * w1.x); r2.z = min(r3.y, r2.z); r4.xyz = r4.xzw * r2.yyy + -r0.xyw; r4.xyz = r2.zzz * r4.xyz + r0.xyw; r2.y = dot(r4.xyz, r4.xyz); r2.y = rsqrt(r2.y); r4.xyz = r4.xyz * r2.yyy; r0.xyw = r2.xxx ? r4.xyz : r0.xyw; if (r6.z != 0) { r2.xy = v3.xz * cb0[70].xyxx + float2(0.5,0.5); r2.xy = cb0[71].zwzz * r2.xy; sincos(cb0[170].w, r4.x, r5.x); r6.x = -r4.x; r6.y = r5.x; r5.x = dot(r6.yx, r2.xy); r6.z = r4.x; r5.y = dot(r6.zy, r2.xy); r2.xy = r3.zz ? r5.xy : r2.xy; r2.xy = cb0[170].zzzz * r2.xy; r4.xyzw = muckSpecGlossTexture.Sample(MuckSpecGlossSampler_s, r2.xy).xyzw; r2.x = cb0[173].x >= 0.5; r2.x = r2.x ? 1.000000 : 0; r2.y = r4.y * r4.y + -r4.x; r2.y = r2.x * r2.y + r4.x; r0.z = -r0.z * r0.z + r2.y; r1.w = r3.x * r0.z + r1.w; r0.z = sqrt(r4.y); r0.z = min(1, r0.z); r0.z = r0.z + -r4.y; r0.z = r2.x * r0.z + r4.y; r0.z = r0.z + -r2.w; r2.w = r3.x * r0.z + r2.w; } } else { o1.xyz = r1.xyz; } r2.w = saturate(r2.w); o1.w = 0.498039246 * r2.w; r1.xyz = r0.xyw >= float3(0,0,0); r1.xyz = r1.xyz ? 1.000000 : 0; r0.y = dot(r1.xyz, float3(2,4,8)); o0.xy = abs(r0.xw); o0.z = 0.00392156886 * r0.y; r0.x = 12.9200001 * r1.w; r0.y = log2(abs(r1.w)); r0.y = 0.416666657 * r0.y; r0.y = exp2(r0.y); r0.y = r0.y * 1.05499995 + -0.0549999997; r0.z = r1.w < 0.00313080009; r0.x = saturate(r0.z ? r0.x : r0.y); o0.w = 0.498039246 * r0.x; o2.xyzw = v0.zzzz; return; } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384 // // using 3Dmigoto v1.2.7 on Sat Nov 14 17:43:40 2015 // // // Buffer Definitions: // // cbuffer GlobalBuffer // { // // float4x4 View; // Offset: 0 Size: 64 [unused] // float4x4 Projection; // Offset: 64 Size: 64 [unused] // float4x4 InvViewProj; // Offset: 128 Size: 64 [unused] // float3 EyePosition; // Offset: 192 Size: 12 [unused] // = 0x00000000 0x00000000 0x00000000 // float3 DirLight0_Dir; // Offset: 208 Size: 12 [unused] // = 0xbf13b646 0xbf13b646 0x3f13b646 // float4 DirLight0_Diffuse; // Offset: 224 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 PointLightActive; // Offset: 240 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 PointLight0_Position_AttenStart;// Offset: 256 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x461c4000 // float4 PointLight0_Diffuse_AttenInvRange;// Offset: 272 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 PointLight1_Position_AttenStart;// Offset: 288 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x461c4000 // float4 PointLight1_Diffuse_AttenInvRange;// Offset: 304 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 PointLight2_Position_AttenStart;// Offset: 320 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x461c4000 // float4 PointLight2_Diffuse_AttenInvRange;// Offset: 336 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 PointLight3_Position_AttenStart;// Offset: 352 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x461c4000 // float4 PointLight3_Diffuse_AttenInvRange;// Offset: 368 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 SHLight[7]; // Offset: 384 Size: 112 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // 0x00000000 0x00000000 0x00000000 0x00000000 // float AmbientScale; // Offset: 496 Size: 4 [unused] // = 0x3f800000 // float AmbientScaleFX; // Offset: 500 Size: 4 [unused] // = 0x3f800000 // float4 AmbientRotation; // Offset: 512 Size: 16 [unused] // = 0x3f800000 0x00000000 0x00000000 0x3f800000 // float4x4 unAdjustedShadowViewMatrix;// Offset: 528 Size: 64 [unused] // float4x4 ShadowVPMatrix; // Offset: 592 Size: 64 [unused] // float4x4 ShadowVPMatrixNear; // Offset: 656 Size: 64 [unused] // float4x4 ShadowVPMatrixFar; // Offset: 720 Size: 64 [unused] // float4 ShadowNearShift; // Offset: 784 Size: 16 [unused] // float4 ShadowNearScale; // Offset: 800 Size: 16 [unused] // float3 ShadowNearFarCutOff; // Offset: 816 Size: 12 [unused] // float ShadowTextureResolution; // Offset: 828 Size: 4 [unused] // float2 ShadowBias; // Offset: 832 Size: 8 [unused] // = 0x3f800000 0x3dcccccd // float2 ShadowSampleOffsetPCF0; // Offset: 840 Size: 8 [unused] // float2 ShadowSampleOffsetPCF1; // Offset: 848 Size: 8 [unused] // float2 ShadowSampleOffsetPCF2; // Offset: 856 Size: 8 [unused] // float2 ShadowSampleOffsetPCF3; // Offset: 864 Size: 8 [unused] // float ShadowCubeDepthBias; // Offset: 872 Size: 4 [unused] // = 0x3f800000 // float ShadowCubeNormalBias; // Offset: 876 Size: 4 [unused] // = 0x3dcccccd // float3 ShadowCubeCoords[4]; // Offset: 880 Size: 60 [unused] // float ShadowCubeSizes[4]; // Offset: 944 Size: 52 [unused] // int CurrentShadowCube; // Offset: 996 Size: 4 [unused] // = 0xffffffff // float4x3 sun_cloud_matrix; // Offset: 1008 Size: 48 [unused] // float sun_cloud_intensity; // Offset: 1056 Size: 4 [unused] // float4 fogConstant; // Offset: 1072 Size: 16 [unused] // = 0x3b83126f 0xc6435000 0x41a00000 0x3fc00000 // float3 fog_light_direction; // Offset: 1088 Size: 12 [unused] // = 0x3f800000 0x00000000 0x00000000 // float2 g_LAO_Parameters; // Offset: 1104 Size: 8 [unused] // = 0x00000000 0x00000000 // float4 terrainSizeInv; // Offset: 1120 Size: 16 // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float2 playableSizeInv; // Offset: 1136 Size: 8 // = 0x3f800000 0x3f800000 // float2 chunkSize; // Offset: 1144 Size: 8 // = 0x3f800000 0x3f800000 // float2 terrainHeightRanges; // Offset: 1152 Size: 8 [unused] // = 0x43160000 0x43160000 // float4x4 compositorViewProjection; // Offset: 1168 Size: 64 // float4 compositorViewRemap; // Offset: 1232 Size: 16 // = 0x3f000000 0x3f000000 0x3f000000 0x3f000000 // float4 dummySpace[2]; // Offset: 1248 Size: 32 [unused] // float4 g_currentTime; // Offset: 1280 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 snowParameters; // Offset: 1296 Size: 16 [unused] // = 0x00000000 0x3f800000 0x00000000 0x3f800000 // float4 snowEdgeFadeParameters; // Offset: 1312 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x41800000 0x40800000 // float4 snowDepthParameters; // Offset: 1328 Size: 16 // = 0x3ecccccd 0x3f800000 0x3f800000 0x3f800000 // float2 snowSparkleParameters; // Offset: 1344 Size: 8 [unused] // = 0x3fe66666 0x00000000 // float4 g_clipping_parameters; // Offset: 1360 Size: 16 [unused] // float4 exposure_control; // Offset: 1376 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x00000000 // float4 g_lighting_parameters; // Offset: 1392 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x00000000 0x00000000 // float4 g_desaturation; // Offset: 1408 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_soldier_light_desaturation;// Offset: 1424 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float4 g_vehicle_light_desaturation;// Offset: 1440 Size: 16 [unused] // = 0x00000000 0x00000000 0x00000000 0x00000000 // float2 atmosphericSkyBlend; // Offset: 1456 Size: 8 [unused] // = 0x3d21cac1 0xbd2a64c3 // float4 g_post_process_parameters; // Offset: 1472 Size: 16 [unused] // = 0x3e3851ec 0x40a00000 0x41200000 0x3f666666 // float postprocess_sepia; // Offset: 1488 Size: 4 [unused] // = 0x00000000 // float4 g_solder_light_colour; // Offset: 1504 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 g_solder_light_direction; // Offset: 1520 Size: 16 [unused] // = 0x00000000 0xbf800000 0x00000000 0x00000000 // float4 g_vehicle_light_colour; // Offset: 1536 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 g_vehicle_light_direction; // Offset: 1552 Size: 16 [unused] // = 0x00000000 0xbf800000 0x00000000 0x00000000 // float3 fxlight_sunDirection; // Offset: 1568 Size: 12 [unused] // = 0x00000000 0x00000000 0x3f800000 // float3 fxlight_sunColour; // Offset: 1584 Size: 12 [unused] // = 0x3f666666 0x3f800000 0x3f800000 // float3 fxlight_ambColour; // Offset: 1600 Size: 12 [unused] // = 0x3f000000 0x3f0ccccd 0x3f19999a // float2 fxlight_modifiers; // Offset: 1616 Size: 8 [unused] // = 0x3f800000 0x3dcccccd // float2 fx_texelSizes; // Offset: 1624 Size: 8 [unused] // = 0x3a000000 0x3f7fe000 // float4 WaterTint; // Offset: 1632 Size: 16 [unused] // float2 WaterAspectRatio; // Offset: 1648 Size: 8 [unused] // = 0x3f800000 0x3f800000 // float2 WaterColourWindScale; // Offset: 1656 Size: 8 [unused] // float4 WaterReflection_SurfaceOffset;// Offset: 1664 Size: 16 [unused] // float2 WaterReflection_WindDirection;// Offset: 1680 Size: 8 [unused] // float WaterReflection_SurfaceBumpiness;// Offset: 1688 Size: 4 [unused] // float4 WaterReflection_ScreenScaleOffset;// Offset: 1696 Size: 16 [unused] // float4 IceHealthThresholds; // Offset: 1712 Size: 16 [unused] // = 0x3ea8f5c3 0x3f28f5c3 0x3f800000 0x3f800000 // float4 IceSlushColour_Tiling; // Offset: 1728 Size: 16 [unused] // float4 IceStressedColour_Tiling; // Offset: 1744 Size: 16 [unused] // float4 IceSolidColour_Tiling; // Offset: 1760 Size: 16 [unused] // float2 IceSectorTiling_InvWidth; // Offset: 1776 Size: 8 [unused] // float2 IceSlushReveal; // Offset: 1784 Size: 8 [unused] // float4x4 ViewOverride[6]; // Offset: 1792 Size: 384 [unused] // float4x4 ProjectionOverride[6]; // Offset: 2176 Size: 384 [unused] // float4 FOWTextureWorldScaleOffset; // Offset: 2560 Size: 16 [unused] // = 0x3f800000 0x3f800000 0x00000000 0x00000000 // float4 fow_visited; // Offset: 2576 Size: 16 [unused] // float4 fow_hidden; // Offset: 2592 Size: 16 [unused] // float4 fow_blend; // Offset: 2608 Size: 16 [unused] // float4 g_topDownRange; // Offset: 2624 Size: 16 [unused] // float4x4 topDownVPMatrix; // Offset: 2640 Size: 64 [unused] // float4 g_topDownTexureSize; // Offset: 2704 Size: 16 [unused] // = 0x00000000 0x00000000 0x3f800000 0x3f800000 // float4 muckParameters; // Offset: 2720 Size: 16 // = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 // float4 g_windVectorAndTime; // Offset: 2736 Size: 16 [unused] // float4 g_trackMapSize; // Offset: 2752 Size: 16 // float g_snowIsMud; // Offset: 2768 Size: 4 // = 0x00000000 // // } // // // Resource Bindings: // // Name Type Format Dim Slot Elements // ------------------------------ ---------- ------- ----------- ---- -------- // compositorDiffuseSampler sampler NA NA 0 1 // compositorSpecularSampler sampler NA NA 1 1 // MuckDiffuseSampler sampler NA NA 2 1 // MuckNormalSampler sampler NA NA 3 1 // MuckSpecGlossSampler sampler NA NA 4 1 // TrackSampler sampler NA NA 5 1 // muckDiffuseTexture texture float4 2d 60 1 // muckNormalTexture texture float4 2d 61 1 // muckSpecGlossTexture texture float4 2d 62 1 // TerrainTrackTexture texture float4 2d 65 1 // compositorDiffuseTexture texture float4 2d 72 1 // compositorSpecularTexture texture float4 2d 73 1 // GlobalBuffer cbuffer NA NA 0 1 // // // // Input signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Position 0 xyzw 0 POS float z // TEXCOORD 0 xy 1 NONE float // TEXCOORD 3 z 1 NONE float z // TEXCOORD 4 w 1 NONE float // TEXCOORD 1 xyz 2 NONE float xyz // TEXCOORD 2 xyz 3 NONE float x z // // // Output signature: // // Name Index Mask Register SysValue Format Used // -------------------- ----- ------ -------- -------- ------- ------ // SV_Target 0 xyzw 0 TARGET float xyzw // SV_Target 1 xyzw 1 TARGET float xyzw // SV_Target 2 xyzw 2 TARGET float xyzw // ps_4_0 dcl_constantbuffer cb0[174], immediateIndexed dcl_sampler s0, mode_default dcl_sampler s1, mode_default dcl_sampler s2, mode_default dcl_sampler s3, mode_default dcl_sampler s4, mode_default dcl_sampler s5, mode_default dcl_resource_texture2d (float,float,float,float) t60 dcl_resource_texture2d (float,float,float,float) t61 dcl_resource_texture2d (float,float,float,float) t62 dcl_resource_texture2d (float,float,float,float) t65 dcl_resource_texture2d (float,float,float,float) t72 dcl_resource_texture2d (float,float,float,float) t73 dcl_input_ps_siv linear noperspective v0.z, position dcl_input_ps linear v1.z dcl_input_ps linear v2.xyz dcl_input_ps linear v3.xz dcl_output o0.xyzw dcl_output o1.xyzw dcl_output o2.xyzw dcl_temps 10 mov r0.xy, v3.xzxx mov r0.z, l(1.000000) dp3 r1.x, r0.xyzx, cb0[73].xzwx dp3 r1.y, r0.xyzx, cb0[74].xzwx dp3 r0.x, r0.xyzx, cb0[76].xzwx div r0.xy, r1.xyxx, r0.xxxx mad r0.xy, r0.xyxx, cb0[77].xyxx, cb0[77].zwzz sample_l r1.xyzw, r0.xyxx, t72.xyzw, s0, l(0.000000) sample_l r0.xyzw, r0.xyxx, t73.xyzw, s1, l(0.000000) mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) dp2 r0.w, r0.xyxx, r0.xyxx add r0.w, -r0.w, l(1.000000) sqrt r0.w, r0.w mul r2.xyz, v2.yxzy, l(1.000000, -1.000000, 1.000000, 0.000000) mul r3.xyz, r0.xxxx, r2.xyzx mad r3.xyz, r0.wwww, v2.xyzx, r3.xyzx mul r4.xyz, v2.xzyx, l(1.000000, -1.000000, 1.000000, 0.000000) mad r0.xyw, r0.yyyy, r4.xyxz, r3.xyxz dp3 r1.w, r0.xywx, r0.xywx rsq r1.w, r1.w mul r0.xyw, r0.xyxw, r1.wwww mul r1.w, r0.z, r0.z sqrt r2.w, r0.z min r2.w, r2.w, l(1.000000) lt r3.x, l(0.500000), cb0[83].z if_nz r3.x mul r3.y, v3.z, cb0[71].y mad r3.zw, v3.xxxx, cb0[71].xxxx, l(0.000000, 0.000000, 0.500000, 0.500000) mov r5.x, cb0[172].z mov r5.yw, l(0,0.500000,0,0.500000) add r3.xz, r3.zzyz, r5.xxyx sample_l r6.xyzw, r3.xzxx, t65.xyzw, s5, l(0.000000) mov r5.z, -cb0[172].z add r3.xy, r3.wyww, r5.zwzz sample_l r3.xyzw, r3.xyxx, t65.xyzw, s5, l(0.000000) mad r3.yz, v3.xxzx, cb0[71].xxyx, l(0.000000, 0.000000, 0.500000, 0.000000) mov r5.xz, l(0.500000,0,0.500000,0) mov r5.y, cb0[172].w add r5.xy, r3.yzyy, r5.xyxx sample_l r7.xyzw, r5.xyxx, t65.xyzw, s5, l(0.000000) mov r5.w, -cb0[172].w add r3.yz, r3.yyzy, r5.zzwz sample_l r5.xyzw, r3.yzyy, t65.yzwx, s5, l(0.000000) mov_sat r5.x, r6.x mov_sat r5.y, r3.x mov_sat r5.z, r7.x mov_sat r5.w, r5.w dp4 r3.x, r5.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000) lt r3.y, v1.z, l(0.100000) lt r3.z, l(0.500000), cb0[173].x or r3.y, r3.z, r3.y mul r3.w, r3.x, v1.z mul_sat r3.w, r3.w, l(10.000000) add r4.w, v1.z, l(-0.100000) mad_sat r4.w, -r4.w, l(2.857143), l(1.000000) mul r4.w, r3.x, r4.w movc r3.y, r3.y, r3.w, r4.w lt r6.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[170].xyzx if_nz r6.x mad r6.xw, v3.xxxz, cb0[70].xxxy, l(0.500000, 0.000000, 0.000000, 0.500000) mul r6.xw, r6.xxxw, cb0[71].zzzw sincos r7.x, r8.x, cb0[170].w mov r9.x, -r7.x mov r9.y, r8.x dp2 r8.x, r9.yxyy, r6.xwxx mov r9.z, r7.x dp2 r8.y, r9.zyzz, r6.xwxx movc r6.xw, r3.zzzz, r8.xxxy, r6.xxxw mul r6.xw, r6.xxxw, cb0[170].xxxx sample r7.xyzw, r6.xwxx, t60.xyzw, s2 mul r8.xyz, r1.xyzx, r7.xyzx add r9.xyz, -r1.xyzx, r7.xyzx mad r9.xyz, r7.wwww, r9.xyzx, r1.xyzx mad r7.xyz, -r1.xyzx, r7.xyzx, r9.xyzx mad r7.xyz, cb0[173].xxxx, r7.xyzx, r8.xyzx mul r3.w, r3.y, r7.w add r7.xyz, -r1.xyzx, r7.xyzx mad r1.xyz, r3.wwww, r7.xyzx, r1.xyzx endif mul r7.xyz, r3.yyyy, r1.xyzx mad o1.xyz, r7.xyzx, l(-0.149999976, -0.149999976, -0.149999976, 0.000000), r1.xyzx if_nz r6.y mad r3.yw, v3.xxxz, cb0[70].xxxy, l(0.000000, 0.500000, 0.000000, 0.500000) mul r3.yw, r3.yyyw, cb0[71].zzzw sincos r6.x, r7.x, cb0[170].w mov r8.x, -r6.x mov r8.y, r7.x dp2 r7.x, r8.yxyy, r3.ywyy mov r8.z, r6.x dp2 r7.y, r8.zyzz, r3.ywyy movc r3.yw, r3.zzzz, r7.xxxy, r3.yyyw mul r3.yw, r3.yyyw, cb0[170].yyyy sample r7.xyzw, r3.ywyy, t61.xyzw, s3 mad r7.xy, r7.wyww, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000) dp2 r3.y, r7.xyxx, r7.xyxx add r3.y, -r3.y, l(1.000000) sqrt r7.z, |r3.y| dp3 r3.y, r7.xyzx, r7.xyzx rsq r3.y, r3.y mul r6.xyw, r3.yyyy, r7.xyxz mul r2.xyz, r2.xyzx, r6.xxxx mad r2.xyz, r6.wwww, v2.xyzx, r2.xyzx mad r2.xyz, r6.yyyy, r4.xyzx, r2.xyzx dp3 r3.y, r2.xyzx, r2.xyzx rsq r3.y, r3.y mad r2.xyz, r2.xyzx, r3.yyyy, -r0.xywx mad r2.xyz, r3.xxxx, r2.xyzx, r0.xywx dp3 r3.y, r2.xyzx, r2.xyzx rsq r3.y, r3.y mul r0.xyw, r2.xyxz, r3.yyyy endif lt r2.x, cb0[173].x, l(0.500000) add r4.xy, -r5.zwzz, r5.xyxx mad r4.z, -r4.x, r4.y, l(1.000000) mov r4.w, -r4.y dp3 r2.y, r4.xzwx, r4.xzwx rsq r2.y, r2.y mul r2.z, r3.x, l(5.000000) min r2.z, r2.z, l(0.800000) mul_sat r3.y, v1.z, l(5.000000) min r2.z, r2.z, r3.y mad r4.xyz, r4.xzwx, r2.yyyy, -r0.xywx mad r4.xyz, r2.zzzz, r4.xyzx, r0.xywx dp3 r2.y, r4.xyzx, r4.xyzx rsq r2.y, r2.y mul r4.xyz, r2.yyyy, r4.xyzx movc r0.xyw, r2.xxxx, r4.xyxz, r0.xyxw if_nz r6.z mad r2.xy, v3.xzxx, cb0[70].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000) mul r2.xy, r2.xyxx, cb0[71].zwzz sincos r4.x, r5.x, cb0[170].w mov r6.x, -r4.x mov r6.y, r5.x dp2 r5.x, r6.yxyy, r2.xyxx mov r6.z, r4.x dp2 r5.y, r6.zyzz, r2.xyxx movc r2.xy, r3.zzzz, r5.xyxx, r2.xyxx mul r2.xy, r2.xyxx, cb0[170].zzzz sample r4.xyzw, r2.xyxx, t62.xyzw, s4 ge r2.x, cb0[173].x, l(0.500000) and r2.x, r2.x, l(0x3f800000) mad r2.y, r4.y, r4.y, -r4.x mad r2.y, r2.x, r2.y, r4.x mad r0.z, -r0.z, r0.z, r2.y mad r1.w, r3.x, r0.z, r1.w sqrt r0.z, r4.y min r0.z, r0.z, l(1.000000) add r0.z, -r4.y, r0.z mad r0.z, r2.x, r0.z, r4.y add r0.z, -r2.w, r0.z mad r2.w, r3.x, r0.z, r2.w endif else mov o1.xyz, r1.xyzx endif mov_sat r2.w, r2.w mul o1.w, r2.w, l(0.498039246) ge r1.xyz, r0.xywx, l(0.000000, 0.000000, 0.000000, 0.000000) and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0) dp3 r0.y, r1.xyzx, l(2.000000, 4.000000, 8.000000, 0.000000) mov o0.xy, |r0.xwxx| mul o0.z, r0.y, l(0.00392156886) mul r0.x, r1.w, l(12.920000) log r0.y, |r1.w| mul r0.y, r0.y, l(0.416666657) exp r0.y, r0.y mad r0.y, r0.y, l(1.055000), l(-0.055000) lt r0.z, r1.w, l(0.00313080009) movc_sat r0.x, r0.z, r0.x, r0.y mul o0.w, r0.x, l(0.498039246) mov o2.xyzw, v0.zzzz ret // Approximately 172 instruction slots used ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ [/code] here is the code in question I guess I could not have chosen a worse start lol
cbuffer GlobalBuffer : register(b0)
{
float4x4 View : packoffset(c0);
float4x4 Projection : packoffset(c4);
float4x4 InvViewProj : packoffset(c8);
float3 EyePosition : packoffset(c12) = float3(0,0,0);
float3 DirLight0_Dir : packoffset(c13) = float3(-0.577000022,-0.577000022,0.577000022);
float4 DirLight0_Diffuse : packoffset(c14) = float4(1,1,1,1);
float4 PointLightActive : packoffset(c15) = float4(0,0,0,0);
float4 PointLight0_Position_AttenStart : packoffset(c16) = float4(0,0,0,10000);
float4 PointLight0_Diffuse_AttenInvRange : packoffset(c17) = float4(1,1,1,1);
float4 PointLight1_Position_AttenStart : packoffset(c18) = float4(0,0,0,10000);
float4 PointLight1_Diffuse_AttenInvRange : packoffset(c19) = float4(1,1,1,1);
float4 PointLight2_Position_AttenStart : packoffset(c20) = float4(0,0,0,10000);
float4 PointLight2_Diffuse_AttenInvRange : packoffset(c21) = float4(1,1,1,1);
float4 PointLight3_Position_AttenStart : packoffset(c22) = float4(0,0,0,10000);
float4 PointLight3_Diffuse_AttenInvRange : packoffset(c23) = float4(1,1,1,1);
float4 SHLight[7] : packoffset(c24) = float4(0,0,0,0);
SamplerState compositorDiffuseSampler_s : register(s0);
SamplerState compositorSpecularSampler_s : register(s1);
SamplerState MuckDiffuseSampler_s : register(s2);
SamplerState MuckNormalSampler_s : register(s3);
SamplerState MuckSpecGlossSampler_s : register(s4);
SamplerState TrackSampler_s : register(s5);
Texture2D<float4> muckDiffuseTexture : register(t60);
Texture2D<float4> muckNormalTexture : register(t61);
Texture2D<float4> muckSpecGlossTexture : register(t62);
Texture2D<float4> TerrainTrackTexture : register(t65);
Texture2D<float4> compositorDiffuseTexture : register(t72);
Texture2D<float4> compositorSpecularTexture : register(t73);

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

void main(
float4 v0 : SV_Position0,
float2 v1 : TEXCOORD0,
float w1 : TEXCOORD3,
float w1 : TEXCOORD4,
float4 v2 : TEXCOORD1,
float3 v3 : TEXCOORD2,
out float4 o0 : SV_Target0,
out float4 o1 : SV_Target1,
out float4 o2 : SV_Target2)
{
float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9;
uint4 bitmask, uiDest;
float4 fDest;

r0.xy = v3.xz;
r0.z = 1;
r1.x = dot(r0.xyz, cb0[73].xzwx);
r1.y = dot(r0.xyz, cb0[74].xzwx);
r0.x = dot(r0.xyz, cb0[76].xzwx);
r0.xy = r1.xy / r0.xx;
r0.xy = r0.xy * cb0[77].xyxx + cb0[77].zwzz;
r1.xyzw = compositorDiffuseTexture.SampleLevel(compositorDiffuseSampler_s, r0.xy, 0).xyzw;
r0.xyzw = compositorSpecularTexture.SampleLevel(compositorSpecularSampler_s, r0.xy, 0).xyzw;
r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
r0.w = dot(r0.xy, r0.xy);
r0.w = 1 + -r0.w;
r0.w = sqrt(r0.w);
r2.xyz = float3(1,-1,1) * v2.yxz;
r3.xyz = r2.xyz * r0.xxx;
r3.xyz = r0.www * v2.xyz + r3.xyz;
r4.xyz = float3(1,-1,1) * v2.xzy;
r0.xyw = r0.yyy * r4.xyz + r3.xyz;
r1.w = dot(r0.xyw, r0.xyw);
r1.w = rsqrt(r1.w);
r0.xyw = r1.www * r0.xyw;
r1.w = r0.z * r0.z;
r2.w = sqrt(r0.z);
r2.w = min(1, r2.w);
r3.x = 0.5 < cb0[83].z;
if (r3.x != 0) {
r3.y = cb0[71].y * v3.z;
r3.zw = v3.xx * cb0[71].xxxx + float2(0.5,0.5);
r5.x = cb0[172].z;
r5.yw = float2(0.5,0.5);
r3.xz = r5.xy + r3.zy;
r6.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.xz, 0).xyzw;
r5.z = cb0[172].z;
r3.xy = r5.zw + r3.wy;
r3.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.xy, 0).xyzw;
r3.yz = v3.xz * cb0[71].xxyx + float2(0,0.5);
r5.xz = float2(0.5,0.5);
r5.y = cb0[172].w;
r5.xy = r5.xy + r3.yz;
r7.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r5.xy, 0).xyzw;
r5.w = cb0[172].w;
r3.yz = r5.zw + r3.yz;
r5.xyzw = TerrainTrackTexture.SampleLevel(TrackSampler_s, r3.yz, 0).yzwx;
r5.x = saturate(r6.x);
r5.y = saturate(r3.x);
r5.z = saturate(r7.x);
r5.w = saturate(r5.w);
r3.x = dot(r5.xyzw, float4(0.25,0.25,0.25,0.25));
r3.y = w1.x < 0.100000001;
r3.z = 0.5 < cb0[173].x;
r3.y = (int)r3.z | (int)r3.y;
r3.w = w1.x * r3.x;
r3.w = saturate(10 * r3.w);
r4.w = -0.100000001 + w1.x;
r4.w = saturate(-r4.w * 2.85714293 + 1);
r4.w = r4.w * r3.x;
r3.y = r3.y ? r3.w : r4.w;
r6.xyz = float3(0,0,0) < cb0[170].xyzx;
if (r6.x != 0) {
r6.xw = v3.xz * cb0[70].xxxy + float2(0.5,0.5);
r6.xw = cb0[71].zzzw * r6.xw;
sincos(cb0[170].w, r7.x, r8.x);
r9.x = -r7.x;
r9.y = r8.x;
r8.x = dot(r9.yx, r6.xw);
r9.z = r7.x;
r8.y = dot(r9.zy, r6.xw);
r6.xw = r3.zz ? r8.xy : r6.xw;
r6.xw = cb0[170].xxxx * r6.xw;
r7.xyzw = muckDiffuseTexture.Sample(MuckDiffuseSampler_s, r6.xw).xyzw;
r8.xyz = r7.xyz * r1.xyz;
r9.xyz = r7.xyz + -r1.xyz;
r9.xyz = r7.www * r9.xyz + r1.xyz;
r7.xyz = -r1.xyz * r7.xyz + r9.xyz;
r7.xyz = cb0[173].xxxx * r7.xyz + r8.xyz;
r3.w = r7.w * r3.y;
r7.xyz = r7.xyz + -r1.xyz;
r1.xyz = r3.www * r7.xyz + r1.xyz;
}
r7.xyz = r1.xyz * r3.yyy;
o1.xyz = r7.xyz * float3(-0.149999976,-0.149999976,-0.149999976) + r1.xyz;
if (r6.y != 0) {
r3.yw = v3.xz * cb0[70].xxxy + float2(0.5,0.5);
r3.yw = cb0[71].zzzw * r3.yw;
sincos(cb0[170].w, r6.x, r7.x);
r8.x = -r6.x;
r8.y = r7.x;
r7.x = dot(r8.yx, r3.yw);
r8.z = r6.x;
r7.y = dot(r8.zy, r3.yw);
r3.yw = r3.zz ? r7.xy : r3.yw;
r3.yw = cb0[170].yyyy * r3.yw;
r7.xyzw = muckNormalTexture.Sample(MuckNormalSampler_s, r3.yw).xyzw;
r7.xy = r7.wy * float2(2,2) + float2(-1,-1);
r3.y = dot(r7.xy, r7.xy);
r3.y = 1 + -r3.y;
r7.z = sqrt(abs(r3.y));
r3.y = dot(r7.xyz, r7.xyz);
r3.y = rsqrt(r3.y);
r6.xyw = r7.xyz * r3.yyy;
r2.xyz = r6.xxx * r2.xyz;
r2.xyz = r6.www * v2.xyz + r2.xyz;
r2.xyz = r6.yyy * r4.xyz + r2.xyz;
r3.y = dot(r2.xyz, r2.xyz);
r3.y = rsqrt(r3.y);
r2.xyz = r2.xyz * r3.yyy + -r0.xyw;
r2.xyz = r3.xxx * r2.xyz + r0.xyw;
r3.y = dot(r2.xyz, r2.xyz);
r3.y = rsqrt(r3.y);
r0.xyw = r3.yyy * r2.xyz;
}
r2.x = cb0[173].x < 0.5;
r4.xy = r5.xy + -r5.zw;
r4.z = -r4.x * r4.y + 1;
r4.w = -r4.y;
r2.y = dot(r4.xzw, r4.xzw);
r2.y = rsqrt(r2.y);
r2.z = 5 * r3.x;
r2.z = min(0.800000012, r2.z);
r3.y = saturate(5 * w1.x);
r2.z = min(r3.y, r2.z);
r4.xyz = r4.xzw * r2.yyy + -r0.xyw;
r4.xyz = r2.zzz * r4.xyz + r0.xyw;
r2.y = dot(r4.xyz, r4.xyz);
r2.y = rsqrt(r2.y);
r4.xyz = r4.xyz * r2.yyy;
r0.xyw = r2.xxx ? r4.xyz : r0.xyw;
if (r6.z != 0) {
r2.xy = v3.xz * cb0[70].xyxx + float2(0.5,0.5);
r2.xy = cb0[71].zwzz * r2.xy;
sincos(cb0[170].w, r4.x, r5.x);
r6.x = -r4.x;
r6.y = r5.x;
r5.x = dot(r6.yx, r2.xy);
r6.z = r4.x;
r5.y = dot(r6.zy, r2.xy);
r2.xy = r3.zz ? r5.xy : r2.xy;
r2.xy = cb0[170].zzzz * r2.xy;
r4.xyzw = muckSpecGlossTexture.Sample(MuckSpecGlossSampler_s, r2.xy).xyzw;
r2.x = cb0[173].x >= 0.5;
r2.x = r2.x ? 1.000000 : 0;
r2.y = r4.y * r4.y + -r4.x;
r2.y = r2.x * r2.y + r4.x;
r0.z = -r0.z * r0.z + r2.y;
r1.w = r3.x * r0.z + r1.w;
r0.z = sqrt(r4.y);
r0.z = min(1, r0.z);
r0.z = r0.z + -r4.y;
r0.z = r2.x * r0.z + r4.y;
r0.z = r0.z + -r2.w;
r2.w = r3.x * r0.z + r2.w;
}
} else {
o1.xyz = r1.xyz;
}
r2.w = saturate(r2.w);
o1.w = 0.498039246 * r2.w;
r1.xyz = r0.xyw >= float3(0,0,0);
r1.xyz = r1.xyz ? 1.000000 : 0;
r0.y = dot(r1.xyz, float3(2,4,8));
o0.xy = abs(r0.xw);
o0.z = 0.00392156886 * r0.y;
r0.x = 12.9200001 * r1.w;
r0.y = log2(abs(r1.w));
r0.y = 0.416666657 * r0.y;
r0.y = exp2(r0.y);
r0.y = r0.y * 1.05499995 + -0.0549999997;
r0.z = r1.w < 0.00313080009;
r0.x = saturate(r0.z ? r0.x : r0.y);
o0.w = 0.498039246 * r0.x;
o2.xyzw = v0.zzzz;
return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
// using 3Dmigoto v1.2.7 on Sat Nov 14 17:43:40 2015
//
//
// Buffer Definitions:
//
// cbuffer GlobalBuffer
// {
//
// float4x4 View; // Offset: 0 Size: 64 [unused]
// float4x4 Projection; // Offset: 64 Size: 64 [unused]
// float4x4 InvViewProj; // Offset: 128 Size: 64 [unused]
// float3 EyePosition; // Offset: 192 Size: 12 [unused]
// = 0x00000000 0x00000000 0x00000000
// float3 DirLight0_Dir; // Offset: 208 Size: 12 [unused]
// = 0xbf13b646 0xbf13b646 0x3f13b646
// float4 DirLight0_Diffuse; // Offset: 224 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 PointLightActive; // Offset: 240 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 PointLight0_Position_AttenStart;// Offset: 256 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x461c4000
// float4 PointLight0_Diffuse_AttenInvRange;// Offset: 272 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 PointLight1_Position_AttenStart;// Offset: 288 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x461c4000
// float4 PointLight1_Diffuse_AttenInvRange;// Offset: 304 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 PointLight2_Position_AttenStart;// Offset: 320 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x461c4000
// float4 PointLight2_Diffuse_AttenInvRange;// Offset: 336 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 PointLight3_Position_AttenStart;// Offset: 352 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x461c4000
// float4 PointLight3_Diffuse_AttenInvRange;// Offset: 368 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 SHLight[7]; // Offset: 384 Size: 112 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// 0x00000000 0x00000000 0x00000000 0x00000000
// float AmbientScale; // Offset: 496 Size: 4 [unused]
// = 0x3f800000
// float AmbientScaleFX; // Offset: 500 Size: 4 [unused]
// = 0x3f800000
// float4 AmbientRotation; // Offset: 512 Size: 16 [unused]
// = 0x3f800000 0x00000000 0x00000000 0x3f800000
// float4x4 unAdjustedShadowViewMatrix;// Offset: 528 Size: 64 [unused]
// float4x4 ShadowVPMatrix; // Offset: 592 Size: 64 [unused]
// float4x4 ShadowVPMatrixNear; // Offset: 656 Size: 64 [unused]
// float4x4 ShadowVPMatrixFar; // Offset: 720 Size: 64 [unused]
// float4 ShadowNearShift; // Offset: 784 Size: 16 [unused]
// float4 ShadowNearScale; // Offset: 800 Size: 16 [unused]
// float3 ShadowNearFarCutOff; // Offset: 816 Size: 12 [unused]
// float ShadowTextureResolution; // Offset: 828 Size: 4 [unused]
// float2 ShadowBias; // Offset: 832 Size: 8 [unused]
// = 0x3f800000 0x3dcccccd
// float2 ShadowSampleOffsetPCF0; // Offset: 840 Size: 8 [unused]
// float2 ShadowSampleOffsetPCF1; // Offset: 848 Size: 8 [unused]
// float2 ShadowSampleOffsetPCF2; // Offset: 856 Size: 8 [unused]
// float2 ShadowSampleOffsetPCF3; // Offset: 864 Size: 8 [unused]
// float ShadowCubeDepthBias; // Offset: 872 Size: 4 [unused]
// = 0x3f800000
// float ShadowCubeNormalBias; // Offset: 876 Size: 4 [unused]
// = 0x3dcccccd
// float3 ShadowCubeCoords[4]; // Offset: 880 Size: 60 [unused]
// float ShadowCubeSizes[4]; // Offset: 944 Size: 52 [unused]
// int CurrentShadowCube; // Offset: 996 Size: 4 [unused]
// = 0xffffffff
// float4x3 sun_cloud_matrix; // Offset: 1008 Size: 48 [unused]
// float sun_cloud_intensity; // Offset: 1056 Size: 4 [unused]
// float4 fogConstant; // Offset: 1072 Size: 16 [unused]
// = 0x3b83126f 0xc6435000 0x41a00000 0x3fc00000
// float3 fog_light_direction; // Offset: 1088 Size: 12 [unused]
// = 0x3f800000 0x00000000 0x00000000
// float2 g_LAO_Parameters; // Offset: 1104 Size: 8 [unused]
// = 0x00000000 0x00000000
// float4 terrainSizeInv; // Offset: 1120 Size: 16
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float2 playableSizeInv; // Offset: 1136 Size: 8
// = 0x3f800000 0x3f800000
// float2 chunkSize; // Offset: 1144 Size: 8
// = 0x3f800000 0x3f800000
// float2 terrainHeightRanges; // Offset: 1152 Size: 8 [unused]
// = 0x43160000 0x43160000
// float4x4 compositorViewProjection; // Offset: 1168 Size: 64
// float4 compositorViewRemap; // Offset: 1232 Size: 16
// = 0x3f000000 0x3f000000 0x3f000000 0x3f000000
// float4 dummySpace[2]; // Offset: 1248 Size: 32 [unused]
// float4 g_currentTime; // Offset: 1280 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 snowParameters; // Offset: 1296 Size: 16 [unused]
// = 0x00000000 0x3f800000 0x00000000 0x3f800000
// float4 snowEdgeFadeParameters; // Offset: 1312 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x41800000 0x40800000
// float4 snowDepthParameters; // Offset: 1328 Size: 16
// = 0x3ecccccd 0x3f800000 0x3f800000 0x3f800000
// float2 snowSparkleParameters; // Offset: 1344 Size: 8 [unused]
// = 0x3fe66666 0x00000000
// float4 g_clipping_parameters; // Offset: 1360 Size: 16 [unused]
// float4 exposure_control; // Offset: 1376 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x00000000
// float4 g_lighting_parameters; // Offset: 1392 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x00000000 0x00000000
// float4 g_desaturation; // Offset: 1408 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_soldier_light_desaturation;// Offset: 1424 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float4 g_vehicle_light_desaturation;// Offset: 1440 Size: 16 [unused]
// = 0x00000000 0x00000000 0x00000000 0x00000000
// float2 atmosphericSkyBlend; // Offset: 1456 Size: 8 [unused]
// = 0x3d21cac1 0xbd2a64c3
// float4 g_post_process_parameters; // Offset: 1472 Size: 16 [unused]
// = 0x3e3851ec 0x40a00000 0x41200000 0x3f666666
// float postprocess_sepia; // Offset: 1488 Size: 4 [unused]
// = 0x00000000
// float4 g_solder_light_colour; // Offset: 1504 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 g_solder_light_direction; // Offset: 1520 Size: 16 [unused]
// = 0x00000000 0xbf800000 0x00000000 0x00000000
// float4 g_vehicle_light_colour; // Offset: 1536 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 g_vehicle_light_direction; // Offset: 1552 Size: 16 [unused]
// = 0x00000000 0xbf800000 0x00000000 0x00000000
// float3 fxlight_sunDirection; // Offset: 1568 Size: 12 [unused]
// = 0x00000000 0x00000000 0x3f800000
// float3 fxlight_sunColour; // Offset: 1584 Size: 12 [unused]
// = 0x3f666666 0x3f800000 0x3f800000
// float3 fxlight_ambColour; // Offset: 1600 Size: 12 [unused]
// = 0x3f000000 0x3f0ccccd 0x3f19999a
// float2 fxlight_modifiers; // Offset: 1616 Size: 8 [unused]
// = 0x3f800000 0x3dcccccd
// float2 fx_texelSizes; // Offset: 1624 Size: 8 [unused]
// = 0x3a000000 0x3f7fe000
// float4 WaterTint; // Offset: 1632 Size: 16 [unused]
// float2 WaterAspectRatio; // Offset: 1648 Size: 8 [unused]
// = 0x3f800000 0x3f800000
// float2 WaterColourWindScale; // Offset: 1656 Size: 8 [unused]
// float4 WaterReflection_SurfaceOffset;// Offset: 1664 Size: 16 [unused]
// float2 WaterReflection_WindDirection;// Offset: 1680 Size: 8 [unused]
// float WaterReflection_SurfaceBumpiness;// Offset: 1688 Size: 4 [unused]
// float4 WaterReflection_ScreenScaleOffset;// Offset: 1696 Size: 16 [unused]
// float4 IceHealthThresholds; // Offset: 1712 Size: 16 [unused]
// = 0x3ea8f5c3 0x3f28f5c3 0x3f800000 0x3f800000
// float4 IceSlushColour_Tiling; // Offset: 1728 Size: 16 [unused]
// float4 IceStressedColour_Tiling; // Offset: 1744 Size: 16 [unused]
// float4 IceSolidColour_Tiling; // Offset: 1760 Size: 16 [unused]
// float2 IceSectorTiling_InvWidth; // Offset: 1776 Size: 8 [unused]
// float2 IceSlushReveal; // Offset: 1784 Size: 8 [unused]
// float4x4 ViewOverride[6]; // Offset: 1792 Size: 384 [unused]
// float4x4 ProjectionOverride[6]; // Offset: 2176 Size: 384 [unused]
// float4 FOWTextureWorldScaleOffset; // Offset: 2560 Size: 16 [unused]
// = 0x3f800000 0x3f800000 0x00000000 0x00000000
// float4 fow_visited; // Offset: 2576 Size: 16 [unused]
// float4 fow_hidden; // Offset: 2592 Size: 16 [unused]
// float4 fow_blend; // Offset: 2608 Size: 16 [unused]
// float4 g_topDownRange; // Offset: 2624 Size: 16 [unused]
// float4x4 topDownVPMatrix; // Offset: 2640 Size: 64 [unused]
// float4 g_topDownTexureSize; // Offset: 2704 Size: 16 [unused]
// = 0x00000000 0x00000000 0x3f800000 0x3f800000
// float4 muckParameters; // Offset: 2720 Size: 16
// = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
// float4 g_windVectorAndTime; // Offset: 2736 Size: 16 [unused]
// float4 g_trackMapSize; // Offset: 2752 Size: 16
// float g_snowIsMud; // Offset: 2768 Size: 4
// = 0x00000000
//
// }
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// compositorDiffuseSampler sampler NA NA 0 1
// compositorSpecularSampler sampler NA NA 1 1
// MuckDiffuseSampler sampler NA NA 2 1
// MuckNormalSampler sampler NA NA 3 1
// MuckSpecGlossSampler sampler NA NA 4 1
// TrackSampler sampler NA NA 5 1
// muckDiffuseTexture texture float4 2d 60 1
// muckNormalTexture texture float4 2d 61 1
// muckSpecGlossTexture texture float4 2d 62 1
// TerrainTrackTexture texture float4 2d 65 1
// compositorDiffuseTexture texture float4 2d 72 1
// compositorSpecularTexture texture float4 2d 73 1
// GlobalBuffer cbuffer NA NA 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float z
// TEXCOORD 0 xy 1 NONE float
// TEXCOORD 3 z 1 NONE float z
// TEXCOORD 4 w 1 NONE float
// TEXCOORD 1 xyz 2 NONE float xyz
// TEXCOORD 2 xyz 3 NONE float x z
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xyzw 0 TARGET float xyzw
// SV_Target 1 xyzw 1 TARGET float xyzw
// SV_Target 2 xyzw 2 TARGET float xyzw
//
ps_4_0
dcl_constantbuffer cb0[174], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_resource_texture2d (float,float,float,float) t60
dcl_resource_texture2d (float,float,float,float) t61
dcl_resource_texture2d (float,float,float,float) t62
dcl_resource_texture2d (float,float,float,float) t65
dcl_resource_texture2d (float,float,float,float) t72
dcl_resource_texture2d (float,float,float,float) t73
dcl_input_ps_siv linear noperspective v0.z, position
dcl_input_ps linear v1.z
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xz
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 10
mov r0.xy, v3.xzxx
mov r0.z, l(1.000000)
dp3 r1.x, r0.xyzx, cb0[73].xzwx
dp3 r1.y, r0.xyzx, cb0[74].xzwx
dp3 r0.x, r0.xyzx, cb0[76].xzwx
div r0.xy, r1.xyxx, r0.xxxx
mad r0.xy, r0.xyxx, cb0[77].xyxx, cb0[77].zwzz
sample_l r1.xyzw, r0.xyxx, t72.xyzw, s0, l(0.000000)
sample_l r0.xyzw, r0.xyxx, t73.xyzw, s1, l(0.000000)
mad r0.xy, r0.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r0.xyxx, r0.xyxx
add r0.w, -r0.w, l(1.000000)
sqrt r0.w, r0.w
mul r2.xyz, v2.yxzy, l(1.000000, -1.000000, 1.000000, 0.000000)
mul r3.xyz, r0.xxxx, r2.xyzx
mad r3.xyz, r0.wwww, v2.xyzx, r3.xyzx
mul r4.xyz, v2.xzyx, l(1.000000, -1.000000, 1.000000, 0.000000)
mad r0.xyw, r0.yyyy, r4.xyxz, r3.xyxz
dp3 r1.w, r0.xywx, r0.xywx
rsq r1.w, r1.w
mul r0.xyw, r0.xyxw, r1.wwww
mul r1.w, r0.z, r0.z
sqrt r2.w, r0.z
min r2.w, r2.w, l(1.000000)
lt r3.x, l(0.500000), cb0[83].z
if_nz r3.x
mul r3.y, v3.z, cb0[71].y
mad r3.zw, v3.xxxx, cb0[71].xxxx, l(0.000000, 0.000000, 0.500000, 0.500000)
mov r5.x, cb0[172].z
mov r5.yw, l(0,0.500000,0,0.500000)
add r3.xz, r3.zzyz, r5.xxyx
sample_l r6.xyzw, r3.xzxx, t65.xyzw, s5, l(0.000000)
mov r5.z, -cb0[172].z
add r3.xy, r3.wyww, r5.zwzz
sample_l r3.xyzw, r3.xyxx, t65.xyzw, s5, l(0.000000)
mad r3.yz, v3.xxzx, cb0[71].xxyx, l(0.000000, 0.000000, 0.500000, 0.000000)
mov r5.xz, l(0.500000,0,0.500000,0)
mov r5.y, cb0[172].w
add r5.xy, r3.yzyy, r5.xyxx
sample_l r7.xyzw, r5.xyxx, t65.xyzw, s5, l(0.000000)
mov r5.w, -cb0[172].w
add r3.yz, r3.yyzy, r5.zzwz
sample_l r5.xyzw, r3.yzyy, t65.yzwx, s5, l(0.000000)
mov_sat r5.x, r6.x
mov_sat r5.y, r3.x
mov_sat r5.z, r7.x
mov_sat r5.w, r5.w
dp4 r3.x, r5.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
lt r3.y, v1.z, l(0.100000)
lt r3.z, l(0.500000), cb0[173].x
or r3.y, r3.z, r3.y
mul r3.w, r3.x, v1.z
mul_sat r3.w, r3.w, l(10.000000)
add r4.w, v1.z, l(-0.100000)
mad_sat r4.w, -r4.w, l(2.857143), l(1.000000)
mul r4.w, r3.x, r4.w
movc r3.y, r3.y, r3.w, r4.w
lt r6.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[170].xyzx
if_nz r6.x
mad r6.xw, v3.xxxz, cb0[70].xxxy, l(0.500000, 0.000000, 0.000000, 0.500000)
mul r6.xw, r6.xxxw, cb0[71].zzzw
sincos r7.x, r8.x, cb0[170].w
mov r9.x, -r7.x
mov r9.y, r8.x
dp2 r8.x, r9.yxyy, r6.xwxx
mov r9.z, r7.x
dp2 r8.y, r9.zyzz, r6.xwxx
movc r6.xw, r3.zzzz, r8.xxxy, r6.xxxw
mul r6.xw, r6.xxxw, cb0[170].xxxx
sample r7.xyzw, r6.xwxx, t60.xyzw, s2
mul r8.xyz, r1.xyzx, r7.xyzx
add r9.xyz, -r1.xyzx, r7.xyzx
mad r9.xyz, r7.wwww, r9.xyzx, r1.xyzx
mad r7.xyz, -r1.xyzx, r7.xyzx, r9.xyzx
mad r7.xyz, cb0[173].xxxx, r7.xyzx, r8.xyzx
mul r3.w, r3.y, r7.w
add r7.xyz, -r1.xyzx, r7.xyzx
mad r1.xyz, r3.wwww, r7.xyzx, r1.xyzx
endif
mul r7.xyz, r3.yyyy, r1.xyzx
mad o1.xyz, r7.xyzx, l(-0.149999976, -0.149999976, -0.149999976, 0.000000), r1.xyzx
if_nz r6.y
mad r3.yw, v3.xxxz, cb0[70].xxxy, l(0.000000, 0.500000, 0.000000, 0.500000)
mul r3.yw, r3.yyyw, cb0[71].zzzw
sincos r6.x, r7.x, cb0[170].w
mov r8.x, -r6.x
mov r8.y, r7.x
dp2 r7.x, r8.yxyy, r3.ywyy
mov r8.z, r6.x
dp2 r7.y, r8.zyzz, r3.ywyy
movc r3.yw, r3.zzzz, r7.xxxy, r3.yyyw
mul r3.yw, r3.yyyw, cb0[170].yyyy
sample r7.xyzw, r3.ywyy, t61.xyzw, s3
mad r7.xy, r7.wyww, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r3.y, r7.xyxx, r7.xyxx
add r3.y, -r3.y, l(1.000000)
sqrt r7.z, |r3.y|
dp3 r3.y, r7.xyzx, r7.xyzx
rsq r3.y, r3.y
mul r6.xyw, r3.yyyy, r7.xyxz
mul r2.xyz, r2.xyzx, r6.xxxx
mad r2.xyz, r6.wwww, v2.xyzx, r2.xyzx
mad r2.xyz, r6.yyyy, r4.xyzx, r2.xyzx
dp3 r3.y, r2.xyzx, r2.xyzx
rsq r3.y, r3.y
mad r2.xyz, r2.xyzx, r3.yyyy, -r0.xywx
mad r2.xyz, r3.xxxx, r2.xyzx, r0.xywx
dp3 r3.y, r2.xyzx, r2.xyzx
rsq r3.y, r3.y
mul r0.xyw, r2.xyxz, r3.yyyy
endif
lt r2.x, cb0[173].x, l(0.500000)
add r4.xy, -r5.zwzz, r5.xyxx
mad r4.z, -r4.x, r4.y, l(1.000000)
mov r4.w, -r4.y
dp3 r2.y, r4.xzwx, r4.xzwx
rsq r2.y, r2.y
mul r2.z, r3.x, l(5.000000)
min r2.z, r2.z, l(0.800000)
mul_sat r3.y, v1.z, l(5.000000)
min r2.z, r2.z, r3.y
mad r4.xyz, r4.xzwx, r2.yyyy, -r0.xywx
mad r4.xyz, r2.zzzz, r4.xyzx, r0.xywx
dp3 r2.y, r4.xyzx, r4.xyzx
rsq r2.y, r2.y
mul r4.xyz, r2.yyyy, r4.xyzx
movc r0.xyw, r2.xxxx, r4.xyxz, r0.xyxw
if_nz r6.z
mad r2.xy, v3.xzxx, cb0[70].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mul r2.xy, r2.xyxx, cb0[71].zwzz
sincos r4.x, r5.x, cb0[170].w
mov r6.x, -r4.x
mov r6.y, r5.x
dp2 r5.x, r6.yxyy, r2.xyxx
mov r6.z, r4.x
dp2 r5.y, r6.zyzz, r2.xyxx
movc r2.xy, r3.zzzz, r5.xyxx, r2.xyxx
mul r2.xy, r2.xyxx, cb0[170].zzzz
sample r4.xyzw, r2.xyxx, t62.xyzw, s4
ge r2.x, cb0[173].x, l(0.500000)
and r2.x, r2.x, l(0x3f800000)
mad r2.y, r4.y, r4.y, -r4.x
mad r2.y, r2.x, r2.y, r4.x
mad r0.z, -r0.z, r0.z, r2.y
mad r1.w, r3.x, r0.z, r1.w
sqrt r0.z, r4.y
min r0.z, r0.z, l(1.000000)
add r0.z, -r4.y, r0.z
mad r0.z, r2.x, r0.z, r4.y
add r0.z, -r2.w, r0.z
mad r2.w, r3.x, r0.z, r2.w
endif
else
mov o1.xyz, r1.xyzx
endif
mov_sat r2.w, r2.w
mul o1.w, r2.w, l(0.498039246)
ge r1.xyz, r0.xywx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
dp3 r0.y, r1.xyzx, l(2.000000, 4.000000, 8.000000, 0.000000)
mov o0.xy, |r0.xwxx|
mul o0.z, r0.y, l(0.00392156886)
mul r0.x, r1.w, l(12.920000)
log r0.y, |r1.w|
mul r0.y, r0.y, l(0.416666657)
exp r0.y, r0.y
mad r0.y, r0.y, l(1.055000), l(-0.055000)
lt r0.z, r1.w, l(0.00313080009)
movc_sat r0.x, r0.z, r0.x, r0.y
mul o0.w, r0.x, l(0.498039246)
mov o2.xyzw, v0.zzzz
ret
// Approximately 172 instruction slots used

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


here is the code in question I guess I could not have chosen a worse start lol

Acer H5360 / BenQ XL2420T + 3D Vision 2 Kit - EVGA GTX 980TI 6GB - i7-3930K@4.0GHz - DX79SI- 16GB RAM@2133 - Win10x64 Home - HTC VIVE

#29
Posted 11/14/2015 04:48 PM   
Is it a VS or a PS? That out float4 o2 : SV_Target2 wassname makes it look like a PS to me. In my experience there seems to be a paired VS for each PS and you can disable the shader you want with the VS which is what I used for that guide. When I did Elite I found both PS and VS shaders for each dodgy shader! You only need the VS and the VS will have the [b]out float4 o5 : SV_Position0[/b] you need. Use NUMPAD 4 and 5 do go through the VS shaders. For disabling, I have updated my post with DHRs technique which is works for both PS and VS. You might want to try that.
Is it a VS or a PS? That out float4 o2 : SV_Target2 wassname makes it look like a PS to me.

In my experience there seems to be a paired VS for each PS and you can disable the shader you want with the VS which is what I used for that guide.

When I did Elite I found both PS and VS shaders for each dodgy shader! You only need the VS and the VS will have the out float4 o5 : SV_Position0 you need.

Use NUMPAD 4 and 5 do go through the VS shaders.

For disabling, I have updated my post with DHRs technique which is works for both PS and VS. You might want to try that.

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.
-------------------
Vitals: Windows 7 64bit, i5 2500 @ 4.4ghz, SLI GTX670, 8GB, Viewsonic VX2268WM

Handy Driver Discussion
Helix Mod - community fixes
Bo3b's Shaderhacker School - How to fix 3D in games
3dsolutionsgaming.com - videos, reviews and 3D fixes

#30
Posted 11/14/2015 04:52 PM   
  2 / 5    
Scroll To Top