I'll go ahead and give the new version a try.
And thanks for the instructions. It's been a while since I last posted, so I guess I should have mentioned again that I had already managed to figure out how to disable the shaders using iniparameters, but the issue is that once I mark the shader it becomes white. If I were looking to just disable the shader that wouldn't be an issue, but since I want to toggle it on/off that's not very ideal. I also expect that will affect any shaders that I try to fix. From the code provided, any idea what's causing the shader to have it's color changed? You mentioned before it could be a decompiler related error.
And thanks for the instructions. It's been a while since I last posted, so I guess I should have mentioned again that I had already managed to figure out how to disable the shaders using iniparameters, but the issue is that once I mark the shader it becomes white. If I were looking to just disable the shader that wouldn't be an issue, but since I want to toggle it on/off that's not very ideal. I also expect that will affect any shaders that I try to fix. From the code provided, any idea what's causing the shader to have it's color changed? You mentioned before it could be a decompiler related error.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Trying to load original_d3d11.dll
Hooked_LoadLibraryExW switching to original dll: original_d3d11.dll to C:\Windows\system32\d3d11.dll.
D3D11CreateDevice called with adapter = 0000000000000000
Hooked_CreateDXGIFactory1 called with riid: IDXGIFactory
calling original CreateDXGIFactory1 API
CreateDXGIFactory1 returned factory = 000000000B300BD0, result = 0
HackerDXGIFactory1::EnumAdapters1(class HackerDXGIFactory1) called: adapter #0 requested
returns adapter: NVIDIA GeForce GTX 780, sysmem=0, vidmem=-1162149888, flags=0
returns result = 0, handle = 0000000006EE2250
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
Replaced Hooked_LoadLibraryExW for: C:\Windows\system32\nvapi64.dll to nvapi64.dll.
HackerUnknown::Release(class HackerDXGIFactory1), counter=1, this=000000000B2FE4A0
created NVAPI stereo handle. Handle = 00000000070A2800
creating stereo parameter texture.
stereo texture created, handle = 000000000B3AB410
creating stereo parameter resource view.
stereo texture resource view created, handle = 000000000347F1D0.
creating .ini constant parameter texture.
IniParam texture created, handle = 000000000B3ABA90
creating IniParam resource view.
Iniparams resource view created, handle = 000000000347FA10.
HackerDevice 000000000348F330 created to wrap 0000000007016918
HackerContext 000000000B3DC820 created to wrap 0000000006FB2840
returns result = 0, device handle = 0000000007016918, device wrapper = 000000000348F330, context handle = 0000000006FB2840, context wrapper = 000000000B3DC820
created HackerDXGIDevice wrapper = 000000000054ECD0 of 00000000070163A8
HackerDXGIDevice::GetAdapter(class HackerDXGIDevice) called with: 000000000054ECC8
created HackerDXGIAdapter wrapper = 000000000B3A63D0 of 0000000006EE2250
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter) called
returns adapter: NVIDIA GeForce GTX 780, sysmem=0, vidmem=-1162149888
HackerUnknown::Release(class HackerDXGIAdapter), counter=2, this=000000000B3A63D0
Hooked_CreateDXGIFactory called with riid: IDXGIFactory
calling original CreateDXGIFactory API
CreateDXGIFactory returned factory = 00000000070BFD80, result = 0
HackerDXGIFactory::EnumAdapters(class HackerDXGIFactory) adapter 0 requested
created HackerDXGIAdapter wrapper = 000000000B3A6490 of 000000000B400F50
returns result = 0
HackerDXGIAdapter::GetDesc(class HackerDXGIAdapter) called
returns adapter: NVIDIA GeForce GTX 780, sysmem=0, vidmem=-1162149888
D3D11CreateDevice called with adapter = 000000000B3A6490
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter) called with GUID: {1D6AD054-FB2F-4000-B3AB-E873A9131A7C}
returns result = 887a0002
HackerUnknown::AddRef(class HackerDXGIAdapter), counter=2, this=000000000B3A6490
HackerDXGIObject::GetPrivateData(class HackerDXGIAdapter) called with GUID:
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
What are your system specs? If you can add them to your signature, that makes things easier for everyone.
If you are running Win7, the latest version 1.1.8 needs the Evil update KB2670838. Version 1.0.1 is the most stable released version. If you are on Win8/8.1, the OS doesn't work well with 3D.
What are your system specs? If you can add them to your signature, that makes things easier for everyone.
If you are running Win7, the latest version 1.1.8 needs the Evil update KB2670838. Version 1.0.1 is the most stable released version. If you are on Win8/8.1, the OS doesn't work well with 3D.
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
Crap, yeah, I specifically made it a point to mention that I had checked and confirmed I had the "evil" update installed, and somehow managed to forget to do that. Even tried to reinstall it. I've added my system to my sig to fill in the rest. I think I was on v1.0.1 before I tried installing the new version with the overlay, and even then I was still having the shaders turn white after marking.
Just did some additional testing, and I was able to install the 3DMigoto 1.1.8 32bit version on another game (Strike Suit Inifinity) and that work perfectly, overlay and all. Marking shaders had no undesirable effect there. Just tried reinstalling the 64bit version on Killing Floor 2, and still crashing, so maybe it has something to do with that particular version. Not sure what other 64 bit DX11 games I might have, but if I can think of any I'll test it there and see.
Crap, yeah, I specifically made it a point to mention that I had checked and confirmed I had the "evil" update installed, and somehow managed to forget to do that. Even tried to reinstall it. I've added my system to my sig to fill in the rest. I think I was on v1.0.1 before I tried installing the new version with the overlay, and even then I was still having the shaders turn white after marking.
Just did some additional testing, and I was able to install the 3DMigoto 1.1.8 32bit version on another game (Strike Suit Inifinity) and that work perfectly, overlay and all. Marking shaders had no undesirable effect there. Just tried reinstalling the 64bit version on Killing Floor 2, and still crashing, so maybe it has something to do with that particular version. Not sure what other 64 bit DX11 games I might have, but if I can think of any I'll test it there and see.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Sorry for the slow response here. The shaders going white after marking is a sign that the Decompiler introduced a flaw in the shader after marking.
The CopyOnMark function takes a given shader that you mark, Decompiles it, then recompiles it, and makes it the active shader. The reason I do that is for this exact purpose- to see if the Decompile has introduced any problems.
This will be game/shader dependent, and in this case it clearly does.
So next step is to provide us the shader code including the Asm at the bottom of the shader so we can take a look and see what went wrong.
We sometimes hand-fix these sorts of problems as it's usually quicker. If it's something that seems common, I'll usually dig further to fix the underylying bug.
Sorry for the slow response here. The shaders going white after marking is a sign that the Decompiler introduced a flaw in the shader after marking.
The CopyOnMark function takes a given shader that you mark, Decompiles it, then recompiles it, and makes it the active shader. The reason I do that is for this exact purpose- to see if the Decompile has introduced any problems.
This will be game/shader dependent, and in this case it clearly does.
So next step is to provide us the shader code including the Asm at the bottom of the shader so we can take a look and see what went wrong.
We sometimes hand-fix these sorts of problems as it's usually quicker. If it's something that seems common, I'll usually dig further to fix the underylying bug.
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 getting back to me on this, and all good on the response time, I'm sure your time is spread thin as is and a valuable commodity!
I have provided the shader code for 4 various shaders in post #344: https://forums.geforce.com/default/topic/685657/3d-vision/3dmigoto-now-open-source-/post/4536269/#4536269
Are those sufficient enough for us to determine the issue, and any sort of pattern involved? Work/progress will be fairly slow, so as long as it's not overly complicated I wont have any issue with doing manual fixes on the issue, although if it's an easy enough bug to squash, all the better! LMK if you need any other info or dumps using other settings in the d3dx.ini file (although I should mention now that one prerequisite for getting the previous versions of 3DM to work for me was to ensure export_hlsl was set to 0, otherwise it crashed on startup).
Thanks for getting back to me on this, and all good on the response time, I'm sure your time is spread thin as is and a valuable commodity!
I have provided the shader code for 4 various shaders in post #344: https://forums.geforce.com/default/topic/685657/3d-vision/3dmigoto-now-open-source-/post/4536269/#4536269
Are those sufficient enough for us to determine the issue, and any sort of pattern involved? Work/progress will be fairly slow, so as long as it's not overly complicated I wont have any issue with doing manual fixes on the issue, although if it's an easy enough bug to squash, all the better! LMK if you need any other info or dumps using other settings in the d3dx.ini file (although I should mention now that one prerequisite for getting the previous versions of 3DM to work for me was to ensure export_hlsl was set to 0, otherwise it crashed on startup).
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
OK, sorry I didn't connect the dots that those are the white affect shaders. (too many games ;->) Those 4 shaders are short and sweet, and I don't think the Decompiler will generate those with an error. All of those instructions are well trodden ground.
To simplify, let's just take one shader and make it work first.
Are you certain that the shader in question is the one that causes the problem? For example, pull the shader out of the folder, launch the game, and look for a glitch. If it's there, that shader is not it. While the game is running, drop the shader in question back into ShaderFixes, and hit F10 to reload it live. If it glitches right then- then it is in fact the right problem.
Please try that experiment and let me know if you are certain this is the shader.
OK, sorry I didn't connect the dots that those are the white affect shaders. (too many games ;->) Those 4 shaders are short and sweet, and I don't think the Decompiler will generate those with an error. All of those instructions are well trodden ground.
To simplify, let's just take one shader and make it work first.
Are you certain that the shader in question is the one that causes the problem? For example, pull the shader out of the folder, launch the game, and look for a glitch. If it's there, that shader is not it. While the game is running, drop the shader in question back into ShaderFixes, and hit F10 to reload it live. If it glitches right then- then it is in fact the right problem.
Please try that experiment and let me know if you are certain this is the shader.
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
Well I'll be... You're absolutely right on the money, down to the one shader not being an issue. I sure as Hell wouldn't have been able to pick that out, especially as quickly as that! So you managed to figure that out by comparing the HLSL at the top vs the ASM code at the bottom, and figured out where the inconsistency was? Guess that's why you have the ASM code there in the first place :D
Cheers, now I can finally get started on hunting some actually broken shaders! I'm sure I'll be returning for more expertise in the near future.
Thanks again!
Well I'll be... You're absolutely right on the money, down to the one shader not being an issue. I sure as Hell wouldn't have been able to pick that out, especially as quickly as that! So you managed to figure that out by comparing the HLSL at the top vs the ASM code at the bottom, and figured out where the inconsistency was? Guess that's why you have the ASM code there in the first place :D
Cheers, now I can finally get started on hunting some actually broken shaders! I'm sure I'll be returning for more expertise in the near future.
Thanks again!
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Yup, that's why I added that original ASM section, so that I can quickly diff the compiled output from the fxc compiler and see what it looks like relative to the orignial. As an example diff, here is the comparison of the first one, where the Decompiler clearly misfired.
[url]https://www.diffchecker.com/h388b9wf[/url]
That's just for edification, I'm not expecting people to learn how to hand-fix this HLSL code, and I use these examples to drive bug fixes for the Decompiler. I added your shader here to the project for a future look.
Yup, that's why I added that original ASM section, so that I can quickly diff the compiled output from the fxc compiler and see what it looks like relative to the orignial. As an example diff, here is the comparison of the first one, where the Decompiler clearly misfired.
That's just for edification, I'm not expecting people to learn how to hand-fix this HLSL code, and I use these examples to drive bug fixes for the Decompiler. I added your shader here to the project for a future look.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607 Latest 3Dmigoto Release Bo3b's School for ShaderHackers
New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.10.zip
New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
[quote="bo3b"]New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.10.zip[/quote]
Hi bo3b - I am not home yet so can't try any of this, but does this mean that the ground reflections shader can be fixed this way?
bo3b said:New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
[quote="mike_ar69"][quote="bo3b"]New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.10.zip[/quote]
Hi bo3b - I am not home yet so can't try any of this, but does this mean that the ground reflections shader can be fixed this way?[/quote]
Yep. Should work. I'm working on finishing the integration to the full workflow, including F10 reload and CopyOnMark because those are seriously valuable. After that's working I can take a look at the reflection shader.
The sequence shown by Flugan there is what we'll use for shaders in Asm. Very much the same as HelixMod.
t125 is StereoParams, t120 is IniParams. When I get a chance I'll document the Prime Directive on the wiki for this style.
[code]dcl_resource_texture1d (float,float,float,float) t120
dcl_resource_texture2d (float,float,float,float) t125
...
ld_indexable(texture2d)(float,float,float,float) r35.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r30.xyzw, l(0, 0, 0, 0), t120.zyzw
[/code]
bo3b said:New update is out with the fixes that DarkStarSword made to the Decompiler to better handle int and uint vartypes when no header information is available.
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Hi bo3b - I am not home yet so can't try any of this, but does this mean that the ground reflections shader can be fixed this way?
Yep. Should work. I'm working on finishing the integration to the full workflow, including F10 reload and CopyOnMark because those are seriously valuable. After that's working I can take a look at the reflection shader.
The sequence shown by Flugan there is what we'll use for shaders in Asm. Very much the same as HelixMod.
t125 is StereoParams, t120 is IniParams. When I get a chance I'll document the Prime Directive on the wiki for this style.
Latest update to Version 1.1.12:
[url]https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.12.zip[/url]
Edit: switch link to 1.1.12.
This version includes the F10 reload, so that you can now edit Asm files in ShaderFixes, and load them live in the game without having to quit.
Right now it also generates some junk xxxx_reasm.txt files which we are using to validate the assembler. We'll turn this off once it all seems to be working and we no longer need them.
After thinking through the use case model, I did not add Asm generation to CopyOnMark. I think it makes more sense for the Asm case to generate files in ShaderCache (w/ export_shaders=1), and in cases where Asm is desirable, copy the file from ShaderCache to ShaderFixes and load there.
The reason to do it this way is otherwise you wind up with two files in the ShaderFixes folder, one HLSL, one Asm. Depending upon the scenario, you might edit one or the other file and expect a change, leading to confusion.
Let's try this approach to start with, and if it doesn't seem to work in practice, we'll change it.
This version includes the F10 reload, so that you can now edit Asm files in ShaderFixes, and load them live in the game without having to quit.
Right now it also generates some junk xxxx_reasm.txt files which we are using to validate the assembler. We'll turn this off once it all seems to be working and we no longer need them.
After thinking through the use case model, I did not add Asm generation to CopyOnMark. I think it makes more sense for the Asm case to generate files in ShaderCache (w/ export_shaders=1), and in cases where Asm is desirable, copy the file from ShaderCache to ShaderFixes and load there.
The reason to do it this way is otherwise you wind up with two files in the ShaderFixes folder, one HLSL, one Asm. Depending upon the scenario, you might edit one or the other file and expect a change, leading to confusion.
Let's try this approach to start with, and if it doesn't seem to work in practice, we'll change it.
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
And thanks for the instructions. It's been a while since I last posted, so I guess I should have mentioned again that I had already managed to figure out how to disable the shaders using iniparameters, but the issue is that once I mark the shader it becomes white. If I were looking to just disable the shader that wouldn't be an issue, but since I want to toggle it on/off that's not very ideal. I also expect that will affect any shaders that I try to fix. From the code provided, any idea what's causing the shader to have it's color changed? You mentioned before it could be a decompiler related error.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
Did not see anything meaningful in the log, but perhaps someone here might
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
If you are running Win7, the latest version 1.1.8 needs the Evil update KB2670838. Version 1.0.1 is the most stable released version. If you are on Win8/8.1, the OS doesn't work well with 3D.
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
Just did some additional testing, and I was able to install the 3DMigoto 1.1.8 32bit version on another game (Strike Suit Inifinity) and that work perfectly, overlay and all. Marking shaders had no undesirable effect there. Just tried reinstalling the 64bit version on Killing Floor 2, and still crashing, so maybe it has something to do with that particular version. Not sure what other 64 bit DX11 games I might have, but if I can think of any I'll test it there and see.
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
The CopyOnMark function takes a given shader that you mark, Decompiles it, then recompiles it, and makes it the active shader. The reason I do that is for this exact purpose- to see if the Decompile has introduced any problems.
This will be game/shader dependent, and in this case it clearly does.
So next step is to provide us the shader code including the Asm at the bottom of the shader so we can take a look and see what went wrong.
We sometimes hand-fix these sorts of problems as it's usually quicker. If it's something that seems common, I'll usually dig further to fix the underylying bug.
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
I have provided the shader code for 4 various shaders in post #344: https://forums.geforce.com/default/topic/685657/3d-vision/3dmigoto-now-open-source-/post/4536269/#4536269
Are those sufficient enough for us to determine the issue, and any sort of pattern involved? Work/progress will be fairly slow, so as long as it's not overly complicated I wont have any issue with doing manual fixes on the issue, although if it's an easy enough bug to squash, all the better! LMK if you need any other info or dumps using other settings in the d3dx.ini file (although I should mention now that one prerequisite for getting the previous versions of 3DM to work for me was to ensure export_hlsl was set to 0, otherwise it crashed on startup).
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
To simplify, let's just take one shader and make it work first.
Are you certain that the shader in question is the one that causes the problem? For example, pull the shader out of the folder, launch the game, and look for a glitch. If it's there, that shader is not it. While the game is running, drop the shader in question back into ShaderFixes, and hit F10 to reload it live. If it glitches right then- then it is in fact the right problem.
Please try that experiment and let me know if you are certain this is the shader.
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
Change the variable from 'bDecompressSceneColor' to the next variable of 'InverseGamma', and that will generate identical code.
Shader 2 and 4 have the same problem, and same manual fix should work.
Shader 3 does not have any bugs, and generates identical code.
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
Cheers, now I can finally get started on hunting some actually broken shaders! I'm sure I'll be returning for more expertise in the near future.
Thanks again!
3D Gaming Rig: CPU: i7 7700K @ 4.9Ghz | Mobo: Asus Maximus Hero VIII | RAM: Corsair Dominator 16GB | GPU: 2 x GTX 1080 Ti SLI | 3xSSDs for OS and Apps, 2 x HDD's for 11GB storage | PSU: Seasonic X-1250 M2| Case: Corsair C70 | Cooling: Corsair H115i Hydro cooler | Displays: Asus PG278QR, BenQ XL2420TX & BenQ HT1075 | OS: Windows 10 Pro + Windows 7 dual boot
Like my fixes? Dontations can be made to: www.paypal.me/DShanz or rshannonca@gmail.com
Like electronic music? Check out: www.soundcloud.com/dj-ryan-king
https://www.diffchecker.com/h388b9wf
That's just for edification, I'm not expecting people to learn how to hand-fix this HLSL code, and I use these examples to drive bug fixes for the Decompiler. I added your shader here to the project for a future look.
Acer H5360 (1280x720@120Hz) - ASUS VG248QE with GSync mod - 3D Vision 1&2 - Driver 372.54
GTX 970 - i5-4670K@4.2GHz - 12GB RAM - Win7x64+evilKB2670838 - 4 Disk X25 RAID
SAGER NP9870-S - GTX 980 - i7-6700K - Win10 Pro 1607
Latest 3Dmigoto Release
Bo3b's School for ShaderHackers
Also wired up Flugan's Assembler to the game load sequence, so you can now edit asm text shaders instead. The reason to do this is for shaders like the Witcher3 ones that have no header information. The only way to get the right code back out is to stay in assembly.
It's pretty rough and ready and the moment, only works at game load, not on F10 or Mark just yet.
Set the export_shaders=1 to get the Asm text shaders in the ShaderCache folder. Hash ids will match with HLSL variants. When you find a shader that needs help, you can manually move the shader into the ShaderFixes folder. If an HLSL shader is there, it takes precedence, so make sure you only have the asm one.
Check the log for errors by looking for your hash id.
Barely tested, but I successfully disabled the shadows in Witcher3 with a 'mov o0, l(0,0,0,0)' instruction.
https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.10.zip
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
Hi bo3b - I am not home yet so can't try any of this, but does this mean that the ground reflections shader can be fixed this way?
Rig: Intel i7-8700K @4.7GHz, 16Gb Ram, SSD, GTX 1080Ti, Win10x64, Asus VG278
Good to know if attempting a ASM fix.
I find it interesting to compare:
ASM:
HLSL:
Thanks to everybody using my assembler it warms my heart.
To have a critical piece of code that everyone can enjoy!
What more can you ask for?
donations: ulfjalmbrant@hotmail.com
Yep. Should work. I'm working on finishing the integration to the full workflow, including F10 reload and CopyOnMark because those are seriously valuable. After that's working I can take a look at the reflection shader.
The sequence shown by Flugan there is what we'll use for shaders in Asm. Very much the same as HelixMod.
t125 is StereoParams, t120 is IniParams. When I get a chance I'll document the Prime Directive on the wiki for this style.
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
https://github.com/bo3b/3Dmigoto/releases/download/0.99.50-alpha/3Dmigoto-1.1.12.zip
Edit: switch link to 1.1.12.
This version includes the F10 reload, so that you can now edit Asm files in ShaderFixes, and load them live in the game without having to quit.
Right now it also generates some junk xxxx_reasm.txt files which we are using to validate the assembler. We'll turn this off once it all seems to be working and we no longer need them.
After thinking through the use case model, I did not add Asm generation to CopyOnMark. I think it makes more sense for the Asm case to generate files in ShaderCache (w/ export_shaders=1), and in cases where Asm is desirable, copy the file from ShaderCache to ShaderFixes and load there.
The reason to do it this way is otherwise you wind up with two files in the ShaderFixes folder, one HLSL, one Asm. Depending upon the scenario, you might edit one or the other file and expect a change, leading to confusion.
Let's try this approach to start with, and if it doesn't seem to work in practice, we'll change it.
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