[quote="tonka"]
Bo3b, thanks very much for the school which I completed in 2 days without the homework. I have learnt a lot and now I am trying to fix the DX11 Unity5 game Vapour. I managed to hide three artifacts, probably shadows, but am now stuck at a large fire which reflects on the whole scene.
I have enabled exclusive full screen via 3DMiToGo but unfortunately the game crashes when using Alt-Tab so experimentation is very difficult. Do you have any ideas how to go about this ? [/quote]
Great, glad that's a good start!
For the alt-tab problem, we still have some sort of a bug with alt-tab where we don't handle memory allocation quite right. Might be that, might be the bug fix DarkStarSword just added for 1.2.9 to fix a refcount problem. That could easily happen at alt-tab, so definitely give it a try first.
If that still is crashing, the technique we've used is to have a second machine that can network access the game machine, and edit the files directly. That way you don't have to alt-tab or leave the game.
tonka said:
Bo3b, thanks very much for the school which I completed in 2 days without the homework. I have learnt a lot and now I am trying to fix the DX11 Unity5 game Vapour. I managed to hide three artifacts, probably shadows, but am now stuck at a large fire which reflects on the whole scene.
I have enabled exclusive full screen via 3DMiToGo but unfortunately the game crashes when using Alt-Tab so experimentation is very difficult. Do you have any ideas how to go about this ?
Great, glad that's a good start!
For the alt-tab problem, we still have some sort of a bug with alt-tab where we don't handle memory allocation quite right. Might be that, might be the bug fix DarkStarSword just added for 1.2.9 to fix a refcount problem. That could easily happen at alt-tab, so definitely give it a try first.
If that still is crashing, the technique we've used is to have a second machine that can network access the game machine, and edit the files directly. That way you don't have to alt-tab or leave the game.
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
@D-Man11, I am not sure what you mean by templates in this respect. Do I have to install Python and if not how do I use them ? There is a Vapour thread by me already from April, should I revive it ?
@bo3b, DarkStarSword said in that thread that there was a problem with Alt-Tab and exclusive full screen in DX11 Unity 5 which still hasn't been fixed obviously.
@D-Man11, I am not sure what you mean by templates in this respect. Do I have to install Python and if not how do I use them ? There is a Vapour thread by me already from April, should I revive it ?
@bo3b, DarkStarSword said in that thread that there was a problem with Alt-Tab and exclusive full screen in DX11 Unity 5 which still hasn't been fixed obviously.
Sorry, I've no idea on the templates.
DarkStarSword is the expert on Unity games and their shadows, so I thought I'd pass that template thing along to you. The Last Tinkerer (a Unity Game) was a huge mess of garbled shadows in 3D Vision and is now perfect with the fix by DarkStarSword. /thnx again for the fix :)
bo3b can probably answer that for you.
DarkStarSword is the expert on Unity games and their shadows, so I thought I'd pass that template thing along to you. The Last Tinkerer (a Unity Game) was a huge mess of garbled shadows in 3D Vision and is now perfect with the fix by DarkStarSword. /thnx again for the fix :)
alt+tab crashing in Unity 5 DX11 exclusive full screen games is a Unity bug unfortunately, and out of our control to fix. If the game is using exclusive mode itself, you can use alt+enter to switch to windowed mode before alt+tab, but if you had to force exclusive mode with 3DMigoto that won't work (because as soon as the game switches to windowed mode we force it back to full screen) and I'm not aware of any workaround at present :(
A Unity fix mostly consists of two parts (there may be other issues, but these two parts will easily get to you 90% fixed or better). First is the lighting/shadow fix, which you can use my template for (see below). The second is fixing halo type issues in vertex shaders - I have scripted that for DX9, but not yet for DX11, but it's very easy to do by hand - it's usually just a matter of inserting the stereo correction formula somewhere in the vertex shader, usually just after the output position has been set
[code]
float4 stereo = StereoParams.Load(0);
r0.x += stereo.x * (r0.w - stereo.y); // r0 may need to change
[/code]
For an idea of where this code needs to be inserted, take a look at some of the examples in this commit (don't worry about the comments, the only important thing is where I inserted those two lines and if I changed r0 to something else):
https://github.com/DarkStarSword/3d-fixes/commit/90cab2f65576dfd942b0863fad1ee599063b4116
My template for Unity 5 DX11 shadows is here:
https://github.com/DarkStarSword/3d-fixes/tree/master/Unity5/DX11
Unity shadows need fixes in both the vertex and pixel shaders.
The directional lighting vertex shader is here (usually the vertex shader hashes will match, except for a few games that use custom third party replacements):
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/Unity5/DX11/ShaderFixes/b78925705424e647-vs_replace.txt
The point/spot/specular/environmental reflection/physical lighting shader is here (again, the hash is almost always the same):
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/Unity5/DX11/ShaderFixes/ca5cfc8e4d8b1ce5-vs_replace.txt
The pixel shaders in that template are all for lights and all follow exactly the same pattern. You might be able to just drop them into the game, but if Unity has updated their lights (which they have done several times since 5.0 already) or the game is using replacement lighting shaders you might need to study the pattern to be able to apply it to the latest variants.
Note that I have not updated the template yet for the accurate specular & environmental reflections, which relies on a very new feature in 3DMigoto - I've got the code to do that in World of Diving but haven't moved it to the template yet.
alt+tab crashing in Unity 5 DX11 exclusive full screen games is a Unity bug unfortunately, and out of our control to fix. If the game is using exclusive mode itself, you can use alt+enter to switch to windowed mode before alt+tab, but if you had to force exclusive mode with 3DMigoto that won't work (because as soon as the game switches to windowed mode we force it back to full screen) and I'm not aware of any workaround at present :(
A Unity fix mostly consists of two parts (there may be other issues, but these two parts will easily get to you 90% fixed or better). First is the lighting/shadow fix, which you can use my template for (see below). The second is fixing halo type issues in vertex shaders - I have scripted that for DX9, but not yet for DX11, but it's very easy to do by hand - it's usually just a matter of inserting the stereo correction formula somewhere in the vertex shader, usually just after the output position has been set
float4 stereo = StereoParams.Load(0);
r0.x += stereo.x * (r0.w - stereo.y); // r0 may need to change
The pixel shaders in that template are all for lights and all follow exactly the same pattern. You might be able to just drop them into the game, but if Unity has updated their lights (which they have done several times since 5.0 already) or the game is using replacement lighting shaders you might need to study the pattern to be able to apply it to the latest variants.
Note that I have not updated the template yet for the accurate specular & environmental reflections, which relies on a very new feature in 3DMigoto - I've got the code to do that in World of Diving but haven't moved it to the template yet.
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
Here's the variant of the physical lighting shader with accurate specular highlights & environmental reflections:
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/World%20of%20Diving/ShaderFixes/ca5cfc8e4d8b1ce5-vs_replace.txt
For this to work it also needs this added in the d3dx.ini and you need to use at 3DMigoto 1.2.4 or later:
[code]
[ResourceUnityPerCameraRare]
[ShaderOverrideDirectional]
Hash = b78925705424e647
ResourceUnityPerCameraRare = vs-cb1
[ShaderOverridePhysical]
Hash = ca5cfc8e4d8b1ce5
vs-cb13 = ResourceUnityPerCameraRare
[/code]
It's a starting point to save time - drop those files into the game's ShaderFixes and see what happens. If the game is using stock standard Unity lights you may not have to change anything at all. If it's using custom lights (or Unity has updated the standard ones more recently than I updated the template) you may need to find more lighting pixel shaders and apply the same pattern to them (the simple pattern from the other lighting pixel shaders that is, not the complicated pattern from the vertex shaders).
You shouldn't need to adjust the lighting vertex shaders at all, particularly not if using the variant from WoD (only reason it's not in the template yet is because I only tested it for 30 seconds in one map). If not using the WoD variant the only necessary adjustment in the vertex shader is for specular highlights and environmental reflections (shadows should work without any adjustment - if they are not you will need to find the new pixel shaders).
It's a starting point to save time - drop those files into the game's ShaderFixes and see what happens. If the game is using stock standard Unity lights you may not have to change anything at all. If it's using custom lights (or Unity has updated the standard ones more recently than I updated the template) you may need to find more lighting pixel shaders and apply the same pattern to them (the simple pattern from the other lighting pixel shaders that is, not the complicated pattern from the vertex shaders).
You shouldn't need to adjust the lighting vertex shaders at all, particularly not if using the variant from WoD (only reason it's not in the template yet is because I only tested it for 30 seconds in one map). If not using the WoD variant the only necessary adjustment in the vertex shader is for specular highlights and environmental reflections (shadows should work without any adjustment - if they are not you will need to find the new pixel shaders).
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
This is the pattern in the lighting pixel shaders:
https://github.com/DarkStarSword/3d-fixes/commit/638ed1c21ba02d1e68d20474c636da54d0d3a288
Again the hard part is just working out where to insert that code (look for a matrix multiply similar to the four lines visible right below where I insert that in each of the shaders), which temporary register to apply it to (it will be used in the matrix multiply), and which variable + component contains the depth (which is usually but not always the third component of the variable on the line immediately above that - in cases where it's not you can trace it from a t0.Sample(), through a multiply & add with the .x and .y of a single constant buffer element, then a 1 / n, and finally a multiply of a three dimensional coordinate).
Again the hard part is just working out where to insert that code (look for a matrix multiply similar to the four lines visible right below where I insert that in each of the shaders), which temporary register to apply it to (it will be used in the matrix multiply), and which variable + component contains the depth (which is usually but not always the third component of the variable on the line immediately above that - in cases where it's not you can trace it from a t0.Sample(), through a multiply & add with the .x and .y of a single constant buffer element, then a 1 / n, and finally a multiply of a three dimensional coordinate).
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
Do you mean that I still have to hunt the shaders but every shader that I find, I replace the contents with your template. Also I see black artifacts of plants or tree branches all over in the mist, are they shadows or what. I have hidden some but is there a better solution ?
Do you mean that I still have to hunt the shaders but every shader that I find, I replace the contents with your template. Also I see black artifacts of plants or tree branches all over in the mist, are they shadows or what. I have hidden some but is there a better solution ?
No, just drop the files in my template in as is with their current filenames.
You might need to hunt additional pixel shaders for lighting if the shadows are still broken - in that case you will need to modify them using the same pattern I applied to the other lighting shaders. This doesn't mean replace the entire contents, it means study what I changed and work out how to make the same changes to the new shaders.
You will also need to hunt vertex shaders for any effects that have a halo (an outline of other nearby objects, usually present on semi-transparent effects like water, smoke, fire, fog, etc) and add the pattern from post #619 to fix those.
The black artefacts don't sound right - can you provide a screenshot? Were these present in the game originally when you first started it with 3DMigoto, or have they only appeared after dumping or editing some shaders (they could be due to decompiler bugs in shaders that are in ShaderFixes, but I can't be sure).
No, just drop the files in my template in as is with their current filenames.
You might need to hunt additional pixel shaders for lighting if the shadows are still broken - in that case you will need to modify them using the same pattern I applied to the other lighting shaders. This doesn't mean replace the entire contents, it means study what I changed and work out how to make the same changes to the new shaders.
You will also need to hunt vertex shaders for any effects that have a halo (an outline of other nearby objects, usually present on semi-transparent effects like water, smoke, fire, fog, etc) and add the pattern from post #619 to fix those.
The black artefacts don't sound right - can you provide a screenshot? Were these present in the game originally when you first started it with 3DMigoto, or have they only appeared after dumping or editing some shaders (they could be due to decompiler bugs in shaders that are in ShaderFixes, but I can't be sure).
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
I disabled that whole lighting reflection effects from the fire and I don't see the black pieces any more so I think that they are lighting or shadow effects.
How do I access the files of the templates? I don't see any download possibility.
Is there any chance that you could take a brief look at the game and give me your opinion of the problems - skip the intro and at the begin go left and you come to the large fire.
I disabled that whole lighting reflection effects from the fire and I don't see the black pieces any more so I think that they are lighting or shadow effects.
How do I access the files of the templates? I don't see any download possibility.
Is there any chance that you could take a brief look at the game and give me your opinion of the problems - skip the intro and at the begin go left and you come to the large fire.
The current filenames of the templates apart from the point/spot/specular/environmental reflection/physical lighting shader don't exist in this game. I dumped all shaders for control.
That is the shader that I disabled to disable the reflections and shadows from the fire. I copied your shader in it but it doesn't seem to have any effect.
The current filenames of the templates apart from the point/spot/specular/environmental reflection/physical lighting shader don't exist in this game. I dumped all shaders for control.
That is the shader that I disabled to disable the reflections and shadows from the fire. I copied your shader in it but it doesn't seem to have any effect.
You can always download the entire repository with this link (but of course this will include everything, not just the templates):
https://github.com/DarkStarSword/3d-fixes/archive/master.zip
Or open the raw view of each of the files and save them individually.
I probably need to understand a little more what you are looking at. If those shaders aren't used by the game it either means it's not using deferred shadows at all, or could have a third party replacement lighting shader with a different vertex shader (which isn't necessarily difficult to solve, but I'm hoping it's not the case as it does complicate things, especially for your first fix).
Can you post a couple of screenshots of the scene you are looking at?
I'd need a copy of the game to be able to look at it myself, and I'm currently in stingy mode due to my cost of living increasing recently so I'm not spending much on games right now (plus I don't have much free time to spend on this and my TODO list is already full). For now let's see where we can get with screenshots and maybe posting the broken shaders here for advice.
BTW I'm heading off to sleep now, so I won't have a chance to look at this anymore until tomorrow.
Or open the raw view of each of the files and save them individually.
I probably need to understand a little more what you are looking at. If those shaders aren't used by the game it either means it's not using deferred shadows at all, or could have a third party replacement lighting shader with a different vertex shader (which isn't necessarily difficult to solve, but I'm hoping it's not the case as it does complicate things, especially for your first fix).
Can you post a couple of screenshots of the scene you are looking at?
I'd need a copy of the game to be able to look at it myself, and I'm currently in stingy mode due to my cost of living increasing recently so I'm not spending much on games right now (plus I don't have much free time to spend on this and my TODO list is already full). For now let's see where we can get with screenshots and maybe posting the broken shaders here for advice.
BTW I'm heading off to sleep now, so I won't have a chance to look at this anymore until tomorrow.
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
Yes, export_shaders=1 will dump all the shaders, but they will be in assembly. You probably want to also turn on export_hlsl=2 to get them in decompiled HLSL (which should dump most shaders, except for any with fatal decompiler bugs).
You can attach a screenshot after posting a message - mouse over the message and you should see three new icons appear next to the quote icon - use the paperclip to attach a screenshot. You can then optionally edit your post and add the url to the attachment in [img] tags to show it inline.
Yes, export_shaders=1 will dump all the shaders, but they will be in assembly. You probably want to also turn on export_hlsl=2 to get them in decompiled HLSL (which should dump most shaders, except for any with fatal decompiler bugs).
You can attach a screenshot after posting a message - mouse over the message and you should see three new icons appear next to the quote icon - use the paperclip to attach a screenshot. You can then optionally edit your post and add the url to the attachment in [img] tags to show it inline.
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
Great, glad that's a good start!
For the alt-tab problem, we still have some sort of a bug with alt-tab where we don't handle memory allocation quite right. Might be that, might be the bug fix DarkStarSword just added for 1.2.9 to fix a refcount problem. That could easily happen at alt-tab, so definitely give it a try first.
If that still is crashing, the technique we've used is to have a second machine that can network access the game machine, and edit the files directly. That way you don't have to alt-tab or leave the game.
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
@bo3b, DarkStarSword said in that thread that there was a problem with Alt-Tab and exclusive full screen in DX11 Unity 5 which still hasn't been fixed obviously.
DarkStarSword is the expert on Unity games and their shadows, so I thought I'd pass that template thing along to you. The Last Tinkerer (a Unity Game) was a huge mess of garbled shadows in 3D Vision and is now perfect with the fix by DarkStarSword. /thnx again for the fix :)
bo3b can probably answer that for you.
A Unity fix mostly consists of two parts (there may be other issues, but these two parts will easily get to you 90% fixed or better). First is the lighting/shadow fix, which you can use my template for (see below). The second is fixing halo type issues in vertex shaders - I have scripted that for DX9, but not yet for DX11, but it's very easy to do by hand - it's usually just a matter of inserting the stereo correction formula somewhere in the vertex shader, usually just after the output position has been set
For an idea of where this code needs to be inserted, take a look at some of the examples in this commit (don't worry about the comments, the only important thing is where I inserted those two lines and if I changed r0 to something else):
https://github.com/DarkStarSword/3d-fixes/commit/90cab2f65576dfd942b0863fad1ee599063b4116
My template for Unity 5 DX11 shadows is here:
https://github.com/DarkStarSword/3d-fixes/tree/master/Unity5/DX11
Unity shadows need fixes in both the vertex and pixel shaders.
The directional lighting vertex shader is here (usually the vertex shader hashes will match, except for a few games that use custom third party replacements):
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/Unity5/DX11/ShaderFixes/b78925705424e647-vs_replace.txt
The point/spot/specular/environmental reflection/physical lighting shader is here (again, the hash is almost always the same):
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/Unity5/DX11/ShaderFixes/ca5cfc8e4d8b1ce5-vs_replace.txt
The pixel shaders in that template are all for lights and all follow exactly the same pattern. You might be able to just drop them into the game, but if Unity has updated their lights (which they have done several times since 5.0 already) or the game is using replacement lighting shaders you might need to study the pattern to be able to apply it to the latest variants.
Note that I have not updated the template yet for the accurate specular & environmental reflections, which relies on a very new feature in 3DMigoto - I've got the code to do that in World of Diving but haven't moved it to the template yet.
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
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/World%20of%20Diving/ShaderFixes/ca5cfc8e4d8b1ce5-vs_replace.txt
For this to work it also needs this added in the d3dx.ini and you need to use at 3DMigoto 1.2.4 or later:
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
You shouldn't need to adjust the lighting vertex shaders at all, particularly not if using the variant from WoD (only reason it's not in the template yet is because I only tested it for 30 seconds in one map). If not using the WoD variant the only necessary adjustment in the vertex shader is for specular highlights and environmental reflections (shadows should work without any adjustment - if they are not you will need to find the new pixel shaders).
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
https://github.com/DarkStarSword/3d-fixes/commit/638ed1c21ba02d1e68d20474c636da54d0d3a288
Again the hard part is just working out where to insert that code (look for a matrix multiply similar to the four lines visible right below where I insert that in each of the shaders), which temporary register to apply it to (it will be used in the matrix multiply), and which variable + component contains the depth (which is usually but not always the third component of the variable on the line immediately above that - in cases where it's not you can trace it from a t0.Sample(), through a multiply & add with the .x and .y of a single constant buffer element, then a 1 / n, and finally a multiply of a three dimensional coordinate).
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
You might need to hunt additional pixel shaders for lighting if the shadows are still broken - in that case you will need to modify them using the same pattern I applied to the other lighting shaders. This doesn't mean replace the entire contents, it means study what I changed and work out how to make the same changes to the new shaders.
You will also need to hunt vertex shaders for any effects that have a halo (an outline of other nearby objects, usually present on semi-transparent effects like water, smoke, fire, fog, etc) and add the pattern from post #619 to fix those.
The black artefacts don't sound right - can you provide a screenshot? Were these present in the game originally when you first started it with 3DMigoto, or have they only appeared after dumping or editing some shaders (they could be due to decompiler bugs in shaders that are in ShaderFixes, but I can't be sure).
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
How do I access the files of the templates? I don't see any download possibility.
Is there any chance that you could take a brief look at the game and give me your opinion of the problems - skip the intro and at the begin go left and you come to the large fire.
That is the shader that I disabled to disable the reflections and shadows from the fire. I copied your shader in it but it doesn't seem to have any effect.
https://github.com/DarkStarSword/3d-fixes/archive/master.zip
Or open the raw view of each of the files and save them individually.
I probably need to understand a little more what you are looking at. If those shaders aren't used by the game it either means it's not using deferred shadows at all, or could have a third party replacement lighting shader with a different vertex shader (which isn't necessarily difficult to solve, but I'm hoping it's not the case as it does complicate things, especially for your first fix).
Can you post a couple of screenshots of the scene you are looking at?
I'd need a copy of the game to be able to look at it myself, and I'm currently in stingy mode due to my cost of living increasing recently so I'm not spending much on games right now (plus I don't have much free time to spend on this and my TODO list is already full). For now let's see where we can get with screenshots and maybe posting the broken shaders here for advice.
BTW I'm heading off to sleep now, so I won't have a chance to look at this anymore until tomorrow.
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 made a screenshot but how do I post it ?
You can attach a screenshot after posting a message - mouse over the message and you should see three new icons appear next to the quote icon - use the paperclip to attach a screenshot. You can then optionally edit your post and add the url to the attachment in [img] tags to show it inline.
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