A heads up: If anyone reading this is planning on doing shader hunting in this game, please do me a favour.......... Edit nvm
bo3b: Good thinking with lowering the auto-repeat speed. If you want to get fancy, you could add the ability to jump by 10 shaders at a time by holding down shift.
If it seems feasible, maybe get (4) to show the CRC name of the file in question. That would make things easier when you alter a bunch of files at once, hit F10, and then wonder which file the syntax error was in (that happened to me a couple of times).
Also, I don't know if this is feasible, but could you add a hotkey that cycles through various commonly applied settings to a shader? For example: original, disabled, o0=1, pushed to infinity?
oh, and what about ignoring everything in a filename after ps_replace? That would let us append labels/comments to the filenames so that you could see what they were at a glance, without having to open each one and read the internal comments
A heads up: If anyone reading this is planning on doing shader hunting in this game, please do me a favour.......... Edit nvm
bo3b: Good thinking with lowering the auto-repeat speed. If you want to get fancy, you could add the ability to jump by 10 shaders at a time by holding down shift.
If it seems feasible, maybe get (4) to show the CRC name of the file in question. That would make things easier when you alter a bunch of files at once, hit F10, and then wonder which file the syntax error was in (that happened to me a couple of times).
Also, I don't know if this is feasible, but could you add a hotkey that cycles through various commonly applied settings to a shader? For example: original, disabled, o0=1, pushed to infinity?
oh, and what about ignoring everything in a filename after ps_replace? That would let us append labels/comments to the filenames so that you could see what they were at a glance, without having to open each one and read the internal comments
[quote="DarkStarSword"]
How does the bloom behave if you vary the convergence setting (without any attempt to fix it)? Is it always drawn at screen depth (driver not applying the formula at all), does it move *much* faster than everything else in the scene (very low W value, likely constant), or comparable to objects at a certain distance (larger W value)?[/quote]Always at screen depth. But in addition, the headlight blooms also seem to be constructed of multiple shaders (you disable one, and the headlight becomes fainter, but is still there until you disable a couple more)
Maybe I should tackle something more discrete, like an HUD element. Would that work in a similar way?
How does the bloom behave if you vary the convergence setting (without any attempt to fix it)? Is it always drawn at screen depth (driver not applying the formula at all), does it move *much* faster than everything else in the scene (very low W value, likely constant), or comparable to objects at a certain distance (larger W value)?
Always at screen depth. But in addition, the headlight blooms also seem to be constructed of multiple shaders (you disable one, and the headlight becomes fainter, but is still there until you disable a couple more)
Maybe I should tackle something more discrete, like an HUD element. Would that work in a similar way?
[quote="Volnaiskra"][quote="DarkStarSword"]How does the bloom behave if you vary the convergence setting (without any attempt to fix it)? Is it always drawn at screen depth (driver not applying the formula at all), does it move *much* faster than everything else in the scene (very low W value, likely constant), or comparable to objects at a certain distance (larger W value)?[/quote]Always at screen depth. But in addition, the headlight blooms also seem to be constructed of multiple shaders (you disable one, and the headlight becomes fainter, but is still there until you disable a couple more)
Maybe I should tackle something more discrete, like an HUD element. Would that work in a similar way? [/quote]
For ones that are always at screen depth, that is pretty likely to just need the output stereo corrected because the driver heuristic misfired.
For HUD elements, they do that on purpose, so in general fixing HUD elements by moving them to some fixed depth is the simplest fix.
If you want to attach a HUD element to a given object, HUD nameplates, that is generally very hard. You need to find some way to determine the proper depth of the object, and it's not always available.
DarkStarSword said:How does the bloom behave if you vary the convergence setting (without any attempt to fix it)? Is it always drawn at screen depth (driver not applying the formula at all), does it move *much* faster than everything else in the scene (very low W value, likely constant), or comparable to objects at a certain distance (larger W value)?
Always at screen depth. But in addition, the headlight blooms also seem to be constructed of multiple shaders (you disable one, and the headlight becomes fainter, but is still there until you disable a couple more)
Maybe I should tackle something more discrete, like an HUD element. Would that work in a similar way?
For ones that are always at screen depth, that is pretty likely to just need the output stereo corrected because the driver heuristic misfired.
For HUD elements, they do that on purpose, so in general fixing HUD elements by moving them to some fixed depth is the simplest fix.
If you want to attach a HUD element to a given object, HUD nameplates, that is generally very hard. You need to find some way to determine the proper depth of the object, and it's not always available.
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
ok, I'm going to tackle a shader from the map. The map is all but unusable, but all because of one layer (the roads). The roads are at screendepth, while everything else is deeper (infinity? not sure). So I need to move the roads deeper too.
Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :(
Edit: Ninja'd... I really need to refresh the page before posting
According to pcgamingwiki.com (bookmark this site), the saves are located in:
<Uplay-folder>\savegames\<user-id>\969
Turn off UPlay cloud sync, then rename that directory and you should be able start over.
For the bloom, if you are finding multiple shaders that affect it you might need to adjust it in all of them (if they are all drawing parts of the effect directly to the back buffer), or just one of the vertex shaders (if they draw the effect to an off-screen buffer, which is then copied to the back-buffer). Keep in mind that some of them might be red herrings as well (I can usually recognise these quickly as the code is often much simpler than I expect for the type of effect), so don't spend too long on one shader if it's not moving the bloom or is breaking something else.
Since it's rendering at screen depth, I would try the standard stereo correction to it's output position since there is a possibility that may just work. If it doesn't work, then chances are the shader doesn't have the necessary depth information to fix it properly (or if it does will be tricky to find), in which case the only options are to move it to a fixed depth (like the examples I gave that move it to infinity), or kill it.
A HUD adjustment does work in a similar way, since we almost always want to move it to a fixed depth.
This is a typical pattern for adjusting UI to a fixed depth, which is defined by the X constant in the d3dx.ini to make it user customisable (hint: enable the reload_config option in the d3dx.ini before starting the game and you will then be able to edit the parameter live):
[code]
float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
float hud_depth = IniParams.Load(0).x;
o0.x += separation * hud_depth;
[/code]e.g: https://github.com/bo3b/3Dmigoto/commit/1e1ad578eca9d80839f0f7554fc12e81bc5f30a5
It's generally not possible (or extremely difficult) to align the HUD to match a specific object (for much the same reason we often can't accurately fix bloom), but occasionally you get lucky and the standard stereo correction works, as it did for enemy markers in Far Cry 4:
https://github.com/bo3b/3Dmigoto/commit/9a30077443d1fb309799298ed3dd4408fe778982
BTW, I noticed the shader you posted is missing headers. That's fine for the simpler fixes where we don't really need them, but keep in mind that this won't be a good game to learn more advanced fixes on.
Edit: Ninja'd... I really need to refresh the page before posting
According to pcgamingwiki.com (bookmark this site), the saves are located in:
<Uplay-folder>\savegames\<user-id>\969
Turn off UPlay cloud sync, then rename that directory and you should be able start over.
For the bloom, if you are finding multiple shaders that affect it you might need to adjust it in all of them (if they are all drawing parts of the effect directly to the back buffer), or just one of the vertex shaders (if they draw the effect to an off-screen buffer, which is then copied to the back-buffer). Keep in mind that some of them might be red herrings as well (I can usually recognise these quickly as the code is often much simpler than I expect for the type of effect), so don't spend too long on one shader if it's not moving the bloom or is breaking something else.
Since it's rendering at screen depth, I would try the standard stereo correction to it's output position since there is a possibility that may just work. If it doesn't work, then chances are the shader doesn't have the necessary depth information to fix it properly (or if it does will be tricky to find), in which case the only options are to move it to a fixed depth (like the examples I gave that move it to infinity), or kill it.
A HUD adjustment does work in a similar way, since we almost always want to move it to a fixed depth.
This is a typical pattern for adjusting UI to a fixed depth, which is defined by the X constant in the d3dx.ini to make it user customisable (hint: enable the reload_config option in the d3dx.ini before starting the game and you will then be able to edit the parameter live):
It's generally not possible (or extremely difficult) to align the HUD to match a specific object (for much the same reason we often can't accurately fix bloom), but occasionally you get lucky and the standard stereo correction works, as it did for enemy markers in Far Cry 4:
https://github.com/bo3b/3Dmigoto/commit/9a30077443d1fb309799298ed3dd4408fe778982
BTW, I noticed the shader you posted is missing headers. That's fine for the simpler fixes where we don't really need them, but keep in mind that this won't be a good game to learn more advanced fixes on.
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
[quote]Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :([/quote]The "prime directive" or "standard stereo correction formula" is the maths that make 3D Vision work. It's pretty fundamental to fixing anything in 3D so you need to be familiar with it:
[url]http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code[/url]
(if you are a maths boff and thinking to yourself, "hang on a tick... that formula can't possibly work!", you're right and the reason is because the formula as we usually apply it is not actually the complete adjustment. There is a hidden division by clipPos.w that happens after the vertex shader has run, known as the "perspective divide". Usually you don't need to worry about it, but occasionally you might)
[quote="Volnaiskra"]ok, I'm going to tackle a shader from the map. The map is all but unusable, but all because of one layer (the roads). The roads are at screendepth, while everything else is deeper (infinity? not sure). So I need to move the roads deeper too.[/quote]Ok, so you are trying to align one effect with another - this may complicate things.
Quick questions - is the map 2D and always at a fixed depth, or is it 3D, or otherwise has a variable depth? Also, does the map depth vary with convergence?
Depending on the answers to these there are several possibilities:
1. Use the standard stereo correction formula/prime directive. There is a possibility it just hasn't been stereoised by the driver, while the map has and this might just work.
2. Use the UI depth adjustment from my previous post. If the map depth varies with convergence this may not work so well, but it's worth trying.
3. Use a variation of the standard stereo correction that moves the roads to a fixed scene depth so they also vary with convergence. Given that you noted that the roads are at screen depth, I think this would be something like this (note: I haven't checked this!):
[code]
float4 stereo = StereoParams.Load(0);
float separation = stereo.x; float convergence = stereo.y;
float fake_depth = 10; // Experiment with this value
o0.x += separation * (fake_depth - convergence) / fake_depth * o0.w;
[/code]
4. There is a possibility that this might not even be a pure UI effect and will need a more advanced fix, but let's try the simple options first.
By the way, posting the shaders is definitely helpful, but I really need to see the effect in context as well to provide the best advice since the shaders don't give me a complete picture of how the game is actually using them and examining a 3D screenshot allows me to guess a lot of that.
Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :(
The "prime directive" or "standard stereo correction formula" is the maths that make 3D Vision work. It's pretty fundamental to fixing anything in 3D so you need to be familiar with it:
(if you are a maths boff and thinking to yourself, "hang on a tick... that formula can't possibly work!", you're right and the reason is because the formula as we usually apply it is not actually the complete adjustment. There is a hidden division by clipPos.w that happens after the vertex shader has run, known as the "perspective divide". Usually you don't need to worry about it, but occasionally you might)
Volnaiskra said:ok, I'm going to tackle a shader from the map. The map is all but unusable, but all because of one layer (the roads). The roads are at screendepth, while everything else is deeper (infinity? not sure). So I need to move the roads deeper too.
Ok, so you are trying to align one effect with another - this may complicate things.
Quick questions - is the map 2D and always at a fixed depth, or is it 3D, or otherwise has a variable depth? Also, does the map depth vary with convergence?
Depending on the answers to these there are several possibilities:
1. Use the standard stereo correction formula/prime directive. There is a possibility it just hasn't been stereoised by the driver, while the map has and this might just work.
2. Use the UI depth adjustment from my previous post. If the map depth varies with convergence this may not work so well, but it's worth trying.
3. Use a variation of the standard stereo correction that moves the roads to a fixed scene depth so they also vary with convergence. Given that you noted that the roads are at screen depth, I think this would be something like this (note: I haven't checked this!):
4. There is a possibility that this might not even be a pure UI effect and will need a more advanced fix, but let's try the simple options first.
By the way, posting the shaders is definitely helpful, but I really need to see the effect in context as well to provide the best advice since the shaders don't give me a complete picture of how the game is actually using them and examining a 3D screenshot allows me to guess a lot of that.
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
[quote="Volnaiskra"]ok, I'm going to tackle a shader from the map. The map is all but unusable, but all because of one layer (the roads). The roads are at screendepth, while everything else is deeper (infinity? not sure). So I need to move the roads deeper too.
Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :([/quote]
So.... That means that you haven't finished the lessons in Bo3b's School for ShaderHackers.
That means you are trying to run before you can walk. Trying to fix shaders without going through that earlier material is just going to be overwhelmingly confusing I think.
[i]Disabling[/i] effects is completely doable with no background. Fixing effects requires understanding more of the pieces, and just jumping in cold is going to be pretty frustrating.
I put a fairly large chunk of time into creating those lessons so that we'd all be at the same level when discussing these sorts of problems, and I'm not keen on spending more time to re-explain the topics here.
If you are planning on fixing effects, please, go back and do the classes. It will save all of us time. All of the concepts in the classes apply directly to 3Dmigoto fixes as well. If the videos are too boring, you should still be able to quickly go through the lesson text.
Volnaiskra said:ok, I'm going to tackle a shader from the map. The map is all but unusable, but all because of one layer (the roads). The roads are at screendepth, while everything else is deeper (infinity? not sure). So I need to move the roads deeper too.
Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :(
So.... That means that you haven't finished the lessons in Bo3b's School for ShaderHackers.
That means you are trying to run before you can walk. Trying to fix shaders without going through that earlier material is just going to be overwhelmingly confusing I think.
Disabling effects is completely doable with no background. Fixing effects requires understanding more of the pieces, and just jumping in cold is going to be pretty frustrating.
I put a fairly large chunk of time into creating those lessons so that we'd all be at the same level when discussing these sorts of problems, and I'm not keen on spending more time to re-explain the topics here.
If you are planning on fixing effects, please, go back and do the classes. It will save all of us time. All of the concepts in the classes apply directly to 3Dmigoto fixes as well. If the videos are too boring, you should still be able to quickly go through the lesson text.
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
Looks like I got caught playing hookey, eh? Ok, I'll go back to class. I got up to the constants one, but it seemed unfamiliar compared to 3dmigoto so I stopped the lessons. I also had looked through the prime directive one, but I took one look at the code and ran away.
Thanks for all the info guys. I'll keep learning and experimenting and report back.
Looks like I got caught playing hookey, eh? Ok, I'll go back to class. I got up to the constants one, but it seemed unfamiliar compared to 3dmigoto so I stopped the lessons. I also had looked through the prime directive one, but I took one look at the code and ran away.
Thanks for all the info guys. I'll keep learning and experimenting and report back.
It's easier than it initially seems, the video lessons are an absolute must. I have no programming background at all, and while I still have to ask for help very frequently, I'm starting to get the basics.
It's easier than it initially seems, the video lessons are an absolute must. I have no programming background at all, and while I still have to ask for help very frequently, I'm starting to get the basics.
I'm getting through them now. Just finished Lesson 5, though it was a bit tricky because I have the full version of The Ball, and some of the code is very different to what bo3b has in the demo (eg. it doesn't have any of the stereoscopic if/else stuff that is in bo3b's video).
But I still managed to solve the lava problem even though the code was different, which is hopefully a good sign. I still draw a blank at words like "canonical" and "heuristics", but I think I'm starting to absorb the general gist.
I really want to make this fix no matter what. I'll certainly be able to disable the worst of the bloom and lens flares. But if I don't manage to get rid of some of the lighting issues, I'll consider the game a "fair" at best, and will opt to play it in 2D myself (though others might differ so I'll still upload the fix). So that's spurring me on to try and learn the more complex stuff despite this being my first time, so I can actually use my own fix.
Between working on Spryke, and making 3D fixes in my spare time, I can see that I'm barely going to play any games this year :D
I'm getting through them now. Just finished Lesson 5, though it was a bit tricky because I have the full version of The Ball, and some of the code is very different to what bo3b has in the demo (eg. it doesn't have any of the stereoscopic if/else stuff that is in bo3b's video).
But I still managed to solve the lava problem even though the code was different, which is hopefully a good sign. I still draw a blank at words like "canonical" and "heuristics", but I think I'm starting to absorb the general gist.
I really want to make this fix no matter what. I'll certainly be able to disable the worst of the bloom and lens flares. But if I don't manage to get rid of some of the lighting issues, I'll consider the game a "fair" at best, and will opt to play it in 2D myself (though others might differ so I'll still upload the fix). So that's spurring me on to try and learn the more complex stuff despite this being my first time, so I can actually use my own fix.
Between working on Spryke, and making 3D fixes in my spare time, I can see that I'm barely going to play any games this year :D
[quote="Volnaiskra"]I'm getting through them now. Just finished Lesson 5, though it was a bit tricky because I have the full version of The Ball, and some of the code is very different to what bo3b has in the demo (eg. it doesn't have any of the stereoscopic if/else stuff that is in bo3b's video).[/quote]I might have to go back and check that - I have the full version, but it's been so long since I looked at it I can't remember if my shaders matched the ones in the lessons or not :-/
[quote]I still draw a blank at words like "canonical" and "heuristics", but I think I'm starting to absorb the general gist.[/quote]"canonical" would be referring to the stereo correction formula (AKA prime directive) - and it just means the standard form of the equation. Some more advanced fixes may need variations of the formula to account for something else - those are stereo corrections, but are not "canonical".
"heuristics" basically means an educated guess. For 3D games, most things need to be converted into 3D, but there are some things that should remain 2D, such as the user interface and shadow maps. The problem is, the driver doesn't know what does and does not been to be 3D, so it makes an educated guess, but it doesn't always get it right - and when it doesn't we need to intervene to fix it's mistake.[/quote]
[quote]I really want to make this fix no matter what.[/quote]Hehe - when I was learning this stuff I had a game like that (Miasmata), but the remaining things to fix in it were on the quite advanced end of the spectrum so I waited until I had fixed a dozen other games and had gained enough experience that I felt I had a realistic chance of solving it. Had to come up with a few new tricks for it as well, but it was so worth it :)
[quote]Between working on Spryke, and making 3D fixes in my spare time, I can see that I'm barely going to play any games this year :D[/quote]God, tell me about it - since I'm spending so much time fixing games I'm not getting through them anywhere near as fast as I used to. My buying habits have slowed down as well, but probably not enough to match.
Volnaiskra said:I'm getting through them now. Just finished Lesson 5, though it was a bit tricky because I have the full version of The Ball, and some of the code is very different to what bo3b has in the demo (eg. it doesn't have any of the stereoscopic if/else stuff that is in bo3b's video).
I might have to go back and check that - I have the full version, but it's been so long since I looked at it I can't remember if my shaders matched the ones in the lessons or not :-/
I still draw a blank at words like "canonical" and "heuristics", but I think I'm starting to absorb the general gist.
"canonical" would be referring to the stereo correction formula (AKA prime directive) - and it just means the standard form of the equation. Some more advanced fixes may need variations of the formula to account for something else - those are stereo corrections, but are not "canonical".
"heuristics" basically means an educated guess. For 3D games, most things need to be converted into 3D, but there are some things that should remain 2D, such as the user interface and shadow maps. The problem is, the driver doesn't know what does and does not been to be 3D, so it makes an educated guess, but it doesn't always get it right - and when it doesn't we need to intervene to fix it's mistake.
I really want to make this fix no matter what.
Hehe - when I was learning this stuff I had a game like that (Miasmata), but the remaining things to fix in it were on the quite advanced end of the spectrum so I waited until I had fixed a dozen other games and had gained enough experience that I felt I had a realistic chance of solving it. Had to come up with a few new tricks for it as well, but it was so worth it :)
Between working on Spryke, and making 3D fixes in my spare time, I can see that I'm barely going to play any games this year :D
God, tell me about it - since I'm spending so much time fixing games I'm not getting through them anywhere near as fast as I used to. My buying habits have slowed down as well, but probably not enough to match.
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
DarkStarSword said:I might have to go back and check that - I have the full version, but it's been so long since I looked at it I can't remember if my shaders matched the ones in the lessons or not :-/
//disable lava
// if Const1 = 0 disable effect, else leave it on
mov r30.x, c220.x
if_eq r30.x, c200.x
mov oC0.xyzw, c200.wwww
//fix lava
mov r30.xyzw, c200.wwww
mul r1.xy, r0.w, r30
mov r30.xyzw, c200.wwww
add r0.w, r0.w, -r30.w
endif
// approximately 70 instruction slots used (10 texture, 60 arithmetic)
Note the missing C3 register. In bob's video that's called NvStereoEnabled. Here, it's just plain missing - like they purposely removed it for the final version.
There's also a 3dvision-related texture register missing (in bob's video it's "NvStereoFixTexture: s1"), as well as related code further down.
Actually, in the bottom body section where all the, er, gibberish is (all that r1.xyyz, mul, add, dp2add stuff) most of my gibberish is different to bob's gibberish. Just comparing them now, I struggle to even find one line that's the same. Even certain commands like "abs" and "cmp" aren't used in mine but are in his.
Yet I managed to solve the lava anyway. It seems pretty clear to me that I must be a natural genius at this stuff. Damn. Handsome and smart.
Oh now I remember - I had jumped ahead in the lessons and had started applying what I was learning to Betrayer instead of The Ball, so naturally the shaders I was looking at didn't match the lessons.
Oh now I remember - I had jumped ahead in the lessons and had started applying what I was learning to Betrayer instead of The Ball, so naturally the shaders I was looking at didn't match the lessons.
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
[quote="DarkStarSword"]
According to pcgamingwiki.com (bookmark this site), the saves are located in:
<Uplay-folder>\savegames\<user-id>\969
Turn off UPlay cloud sync, then rename that directory and you should be able start over.[/quote]Weird, I don't have the 969 folder at all. When googling, the consensus seems to be that the saves are stored server-side. But apparently you can get a new "starter car" with a microtransaction and replay the first bit, so I might have a look at that later on.
DarkStarSword said:
According to pcgamingwiki.com (bookmark this site), the saves are located in:
<Uplay-folder>\savegames\<user-id>\969
Turn off UPlay cloud sync, then rename that directory and you should be able start over.
Weird, I don't have the 969 folder at all. When googling, the consensus seems to be that the saves are stored server-side. But apparently you can get a new "starter car" with a microtransaction and replay the first bit, so I might have a look at that later on.
bo3b: Good thinking with lowering the auto-repeat speed. If you want to get fancy, you could add the ability to jump by 10 shaders at a time by holding down shift.
If it seems feasible, maybe get (4) to show the CRC name of the file in question. That would make things easier when you alter a bunch of files at once, hit F10, and then wonder which file the syntax error was in (that happened to me a couple of times).
Also, I don't know if this is feasible, but could you add a hotkey that cycles through various commonly applied settings to a shader? For example: original, disabled, o0=1, pushed to infinity?
oh, and what about ignoring everything in a filename after ps_replace? That would let us append labels/comments to the filenames so that you could see what they were at a glance, without having to open each one and read the internal comments
Maybe I should tackle something more discrete, like an HUD element. Would that work in a similar way?
For ones that are always at screen depth, that is pretty likely to just need the output stereo corrected because the driver heuristic misfired.
For HUD elements, they do that on purpose, so in general fixing HUD elements by moving them to some fixed depth is the simplest fix.
If you want to attach a HUD element to a given object, HUD nameplates, that is generally very hard. You need to find some way to determine the proper depth of the object, and it's not always available.
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
Please help me do this. But you'll need to dumb down your language. When you guys say things like "apply the prime directive" I have no idea what you're talking about :(
Here's the pixel shader:
And here's the vertex shader:
According to pcgamingwiki.com (bookmark this site), the saves are located in:
<Uplay-folder>\savegames\<user-id>\969
Turn off UPlay cloud sync, then rename that directory and you should be able start over.
For the bloom, if you are finding multiple shaders that affect it you might need to adjust it in all of them (if they are all drawing parts of the effect directly to the back buffer), or just one of the vertex shaders (if they draw the effect to an off-screen buffer, which is then copied to the back-buffer). Keep in mind that some of them might be red herrings as well (I can usually recognise these quickly as the code is often much simpler than I expect for the type of effect), so don't spend too long on one shader if it's not moving the bloom or is breaking something else.
Since it's rendering at screen depth, I would try the standard stereo correction to it's output position since there is a possibility that may just work. If it doesn't work, then chances are the shader doesn't have the necessary depth information to fix it properly (or if it does will be tricky to find), in which case the only options are to move it to a fixed depth (like the examples I gave that move it to infinity), or kill it.
A HUD adjustment does work in a similar way, since we almost always want to move it to a fixed depth.
This is a typical pattern for adjusting UI to a fixed depth, which is defined by the X constant in the d3dx.ini to make it user customisable (hint: enable the reload_config option in the d3dx.ini before starting the game and you will then be able to edit the parameter live):
e.g: https://github.com/bo3b/3Dmigoto/commit/1e1ad578eca9d80839f0f7554fc12e81bc5f30a5
It's generally not possible (or extremely difficult) to align the HUD to match a specific object (for much the same reason we often can't accurately fix bloom), but occasionally you get lucky and the standard stereo correction works, as it did for enemy markers in Far Cry 4:
https://github.com/bo3b/3Dmigoto/commit/9a30077443d1fb309799298ed3dd4408fe778982
BTW, I noticed the shader you posted is missing headers. That's fine for the simpler fixes where we don't really need them, but keep in mind that this won't be a good game to learn more advanced fixes on.
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
http://wiki.bo3b.net/index.php?title=Canonical_Stereo_Code
(if you are a maths boff and thinking to yourself, "hang on a tick... that formula can't possibly work!", you're right and the reason is because the formula as we usually apply it is not actually the complete adjustment. There is a hidden division by clipPos.w that happens after the vertex shader has run, known as the "perspective divide". Usually you don't need to worry about it, but occasionally you might)
Ok, so you are trying to align one effect with another - this may complicate things.
Quick questions - is the map 2D and always at a fixed depth, or is it 3D, or otherwise has a variable depth? Also, does the map depth vary with convergence?
Depending on the answers to these there are several possibilities:
1. Use the standard stereo correction formula/prime directive. There is a possibility it just hasn't been stereoised by the driver, while the map has and this might just work.
2. Use the UI depth adjustment from my previous post. If the map depth varies with convergence this may not work so well, but it's worth trying.
3. Use a variation of the standard stereo correction that moves the roads to a fixed scene depth so they also vary with convergence. Given that you noted that the roads are at screen depth, I think this would be something like this (note: I haven't checked this!):
4. There is a possibility that this might not even be a pure UI effect and will need a more advanced fix, but let's try the simple options first.
By the way, posting the shaders is definitely helpful, but I really need to see the effect in context as well to provide the best advice since the shaders don't give me a complete picture of how the game is actually using them and examining a 3D screenshot allows me to guess a lot of that.
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
So.... That means that you haven't finished the lessons in Bo3b's School for ShaderHackers.
That means you are trying to run before you can walk. Trying to fix shaders without going through that earlier material is just going to be overwhelmingly confusing I think.
Disabling effects is completely doable with no background. Fixing effects requires understanding more of the pieces, and just jumping in cold is going to be pretty frustrating.
I put a fairly large chunk of time into creating those lessons so that we'd all be at the same level when discussing these sorts of problems, and I'm not keen on spending more time to re-explain the topics here.
If you are planning on fixing effects, please, go back and do the classes. It will save all of us time. All of the concepts in the classes apply directly to 3Dmigoto fixes as well. If the videos are too boring, you should still be able to quickly go through the lesson text.
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
Thanks for all the info guys. I'll keep learning and experimenting and report back.
But I still managed to solve the lava problem even though the code was different, which is hopefully a good sign. I still draw a blank at words like "canonical" and "heuristics", but I think I'm starting to absorb the general gist.
I really want to make this fix no matter what. I'll certainly be able to disable the worst of the bloom and lens flares. But if I don't manage to get rid of some of the lighting issues, I'll consider the game a "fair" at best, and will opt to play it in 2D myself (though others might differ so I'll still upload the fix). So that's spurring me on to try and learn the more complex stuff despite this being my first time, so I can actually use my own fix.
Between working on Spryke, and making 3D fixes in my spare time, I can see that I'm barely going to play any games this year :D
"canonical" would be referring to the stereo correction formula (AKA prime directive) - and it just means the standard form of the equation. Some more advanced fixes may need variations of the formula to account for something else - those are stereo corrections, but are not "canonical".
"heuristics" basically means an educated guess. For 3D games, most things need to be converted into 3D, but there are some things that should remain 2D, such as the user interface and shadow maps. The problem is, the driver doesn't know what does and does not been to be 3D, so it makes an educated guess, but it doesn't always get it right - and when it doesn't we need to intervene to fix it's mistake.
Hehe - when I was learning this stuff I had a game like that (Miasmata), but the remaining things to fix in it were on the quite advanced end of the spectrum so I waited until I had fixed a dozen other games and had gained enough experience that I felt I had a realistic chance of solving it. Had to come up with a few new tricks for it as well, but it was so worth it :)
God, tell me about it - since I'm spending so much time fixing games I'm not getting through them anywhere near as fast as I used to. My buying habits have slowed down as well, but probably not enough to match.
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
Here's the lava shader as I have it
Note the missing C3 register. In bob's video that's called NvStereoEnabled. Here, it's just plain missing - like they purposely removed it for the final version.
There's also a 3dvision-related texture register missing (in bob's video it's "NvStereoFixTexture: s1"), as well as related code further down.
Actually, in the bottom body section where all the, er, gibberish is (all that r1.xyyz, mul, add, dp2add stuff) most of my gibberish is different to bob's gibberish. Just comparing them now, I struggle to even find one line that's the same. Even certain commands like "abs" and "cmp" aren't used in mine but are in his.
Yet I managed to solve the lava anyway. It seems pretty clear to me that I must be a natural genius at this stuff. Damn. Handsome and smart.
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
I have a foggy understanding of the principles, though much better than before. I'm ready to jump back into the crew and tackle that rogue map layer.
I want to try the various methods you guys have suggested thus far, but I'm hitting a block when trying the first one (the canonical code).
The problem seems to come down to o2.w. When I include it, I get a low beep. Am I supposed to declare it earlier or something?