Bo3b's School For Shaderhackers
  22 / 88    
I've come up with an alternate approach you might be able to use to distinguish markers from fog. Helix mod has the ability to override a vertex shader based on which pixel shader it is used with (The X3 fix does this, but there it was to insert a missing vertex shader). You will need to hunt down the pixel shaders used for the markers and fog (and any other effects you are currently fixing with 77704446). These will all need to be added to the ShaderOverride\PixelShaders folder, though you do not need to alter them (except maybe to upgrade them to ps_3_0 if they are an earlier version). Then, rename your 77704446.txt to the CRC of the pixel shader and add a .txt.ps extension (e.g. if the pixel shader for the UI was 12345678.txt, you would rename 77704446.txt to Shaderoverride\VetexShaders\12345678.txt.ps). Make a copy of this shader for each pixel shader and name it appropriately. Then, you only need to apply a single fix inside each of the vertex shaders for whichever pixel shader they corresponds with :) I just successfully tried this approach on Montague's Mount to separate out the HUD from the lens flare/halo: https://github.com/DarkStarSword/3d-fixes/commit/acf86f567ef91cfc6e6d5557294f0bf47bc7d337
I've come up with an alternate approach you might be able to use to distinguish markers from fog. Helix mod has the ability to override a vertex shader based on which pixel shader it is used with (The X3 fix does this, but there it was to insert a missing vertex shader).

You will need to hunt down the pixel shaders used for the markers and fog (and any other effects you are currently fixing with 77704446). These will all need to be added to the ShaderOverride\PixelShaders folder, though you do not need to alter them (except maybe to upgrade them to ps_3_0 if they are an earlier version).

Then, rename your 77704446.txt to the CRC of the pixel shader and add a .txt.ps extension (e.g. if the pixel shader for the UI was 12345678.txt, you would rename 77704446.txt to Shaderoverride\VetexShaders\12345678.txt.ps). Make a copy of this shader for each pixel shader and name it appropriately.

Then, you only need to apply a single fix inside each of the vertex shaders for whichever pixel shader they corresponds with :)

I just successfully tried this approach on Montague's Mount to separate out the HUD from the lens flare/halo:
https://github.com/DarkStarSword/3d-fixes/commit/acf86f567ef91cfc6e6d5557294f0bf47bc7d337

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/15/2014 11:35 PM   
I whipped up a quick utility to do the 'work' above for you, save the following code as _ImportPStoVS.bat and copy it to the folder containing the Dumps and ShaderOverride folders. It works off of the Shaders in the Dumps\SingleShaders\PixelShader\ folder, so clear any out that you don't want to apply the VertexShader code to and/or find and Dump the Shaders in-game and then run the bat script. It will ask for the VertexShader's CRC, type or paste it and hit Enter, it will get/correct the PixelShader CRCs from the SingleShader Dumps folder and copy it to the ShaderOverride\PixelShaders\ folder as well as make a copy/copies of the VertexShader from the ShaderOverride with the PixelShaders' CRCs and the .txt.ps extension. [code]@Title ImportPStoVS&&@Echo Off SetLocal EnableDelayedExpansion :Prompt Set /P "$CRC=VertexShaderCRC:" if Not Exist "ShaderOverride\VertexShaders\%$CRC%.txt" Goto:Prompt if Not Exist "ShaderOverride\PixelShaders\" MD "ShaderOverride\PixelShaders\" for /F "delims=" %%? in ('Dir /B "Dumps\SingleShaders\PixelShader\*.txt"') do ( for /F "tokens=4 delims=_. " %%@ in ("%%?") do ( Set "$CRC=00000000%%@"&&Set "$CRC=!$CRC:~8!" Copy /V "Dumps\SingleShaders\PixelShader\%%?" "ShaderOverride\PixelShaders\!$CRC!.txt" Copy /V "ShaderOverride\VertexShaders\%$CRC%.txt" "ShaderOverride\VertexShaders\!$CRC!.txt.ps" )) Pause[/code] [s]edit:Oops missed the Copy to ShaderOverride\PixelShaders\ part ... give me a sec.[/s] That should do it! :)
I whipped up a quick utility to do the 'work' above for you, save the following code as _ImportPStoVS.bat and copy it to the folder containing the Dumps and ShaderOverride folders.

It works off of the Shaders in the Dumps\SingleShaders\PixelShader\ folder, so clear any out that you don't want to apply the VertexShader code to and/or find and Dump the Shaders in-game and then run the bat script.

It will ask for the VertexShader's CRC, type or paste it and hit Enter, it will get/correct the PixelShader CRCs from the SingleShader Dumps folder and copy it to the ShaderOverride\PixelShaders\ folder as well as make a copy/copies of the VertexShader from the ShaderOverride with the PixelShaders' CRCs and the .txt.ps extension.

@Title ImportPStoVS&&@Echo Off
SetLocal EnableDelayedExpansion
:Prompt
Set /P "$CRC=VertexShaderCRC:"
if Not Exist "ShaderOverride\VertexShaders\%$CRC%.txt" Goto:Prompt
if Not Exist "ShaderOverride\PixelShaders\" MD "ShaderOverride\PixelShaders\"
for /F "delims=" %%? in ('Dir /B "Dumps\SingleShaders\PixelShader\*.txt"') do (
for /F "tokens=4 delims=_. " %%@ in ("%%?") do (
Set "$CRC=00000000%%@"&&Set "$CRC=!$CRC:~8!"
Copy /V "Dumps\SingleShaders\PixelShader\%%?" "ShaderOverride\PixelShaders\!$CRC!.txt"
Copy /V "ShaderOverride\VertexShaders\%$CRC%.txt" "ShaderOverride\VertexShaders\!$CRC!.txt.ps"
))
Pause

edit:Oops missed the Copy to ShaderOverride\PixelShaders\ part ... give me a sec. That should do it! :)
Posted 12/16/2014 02:27 AM   
Thank You both very much for the advice and the utility! To quote DarkStarSword from his Githup coment about Montague's Mount: [b]"Result: Hell yes!"[/b] XD PS filtering seems to be a reliable way to distinguish between the marker and the other elements. I also was very happy to see that I don't have to find the PS for all the other effects influenced by VS77704446 (which would be dozens). I just can leave the "normal" VS77704446 in the override which fixes the halo issues for fog, etc. And I only have to add the special txt.ps for the marker. But this doesn't seem to work with every PS connected to VS77704446. I wanted fix a glow effect from VS77704446 on a loading screen (with my slow PC this is the part of the game I'm watching 25% of time). The necessary correction is the same as for the marker. But when I used the 827C3F1B.txt.ps for its PS827C3F1B the normal 77704446.txt didn't work any more and the fix for the glow effect was used on every PS connected with VS77704446. So I had to remove this 827C3F1B.txt.ps. In contrary to this other elements from the loading screen didn't cause issues when filtered with txt.ps. But I could remove the wrong placed glow effect now using texture filtering in VS77704446. As the marker has its own shader there is no risk any more that texture filtering could send wrong results. Finally the loadings screen looks like a flight through a wormhole in S3D and no more like a 2D video at screen depth :) I have also tested texture filtering in PS using the same code quoted above but with TexCounterReg = 150 (I couldn't find c150 in the dumpall folder so there should be no collision). And to a certain degree it was successful as the modified shader was accepted now and worked per se. But the value for c150 always seems to be 0 regardless if the texture CRC is in DefinedTexturesPS or not. So the filtering didn't work. I tested several PS, including a PS which had a functioning texture filtering in the correspondent VS. As the speech bubbles are at correct depth now I don't need the filtering for PS any more for my FF XIII-2 fix. So it doesn't matter but it would be nice to know how to get it working for other fixes ;)
Thank You both very much for the advice and the utility! To quote DarkStarSword from his Githup coment about Montague's Mount:
"Result: Hell yes!" XD
PS filtering seems to be a reliable way to distinguish between the marker and the other elements. I also was very happy to see that I don't have to find the PS for all the other effects influenced by VS77704446 (which would be dozens). I just can leave the "normal" VS77704446 in the override which fixes the halo issues for fog, etc. And I only have to add the special txt.ps for the marker. But this doesn't seem to work with every PS connected to VS77704446. I wanted fix a glow effect from VS77704446 on a loading screen (with my slow PC this is the part of the game I'm watching 25% of time). The necessary correction is the same as for the marker. But when I used the 827C3F1B.txt.ps for its PS827C3F1B the normal 77704446.txt didn't work any more and the fix for the glow effect was used on every PS connected with VS77704446. So I had to remove this 827C3F1B.txt.ps. In contrary to this other elements from the loading screen didn't cause issues when filtered with txt.ps. But I could remove the wrong placed glow effect now using texture filtering in VS77704446. As the marker has its own shader there is no risk any more that texture filtering could send wrong results. Finally the loadings screen looks like a flight through a wormhole in S3D and no more like a 2D video at screen depth :)

I have also tested texture filtering in PS using the same code quoted above but with TexCounterReg = 150 (I couldn't find c150 in the dumpall folder so there should be no collision). And to a certain degree it was successful as the modified shader was accepted now and worked per se. But the value for c150 always seems to be 0 regardless if the texture CRC is in DefinedTexturesPS or not. So the filtering didn't work. I tested several PS, including a PS which had a functioning texture filtering in the correspondent VS. As the speech bubbles are at correct depth now I don't need the filtering for PS any more for my FF XIII-2 fix. So it doesn't matter but it would be nice to know how to get it working for other fixes ;)

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

Posted 12/16/2014 02:17 PM   
Awesome! Great to hear it's all working now =D Thanks for the info about leaving a default vertex shader in place - I was wondering if that would work and how reliable it would be :) I'll have to take a closer look at texture filtering in pixel shaders, but I'm glad you were able to get it working with the fix in the vertex shader instead :)
Awesome! Great to hear it's all working now =D

Thanks for the info about leaving a default vertex shader in place - I was wondering if that would work and how reliable it would be :)

I'll have to take a closer look at texture filtering in pixel shaders, but I'm glad you were able to get it working with the fix in the vertex shader instead :)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/16/2014 06:52 PM   
There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file? Things like: 1. The XXXXXXX.txt.1 trick (which by the way I used in Divinity Original Sin, so it does work, if you want to look at an example) 2. The .ps trick described above, and what it is useful for 3. Shader hunting VS for a given PS (DarkStarSword posted that, I did not know about it) but I can't remember how that works 4. Setting the flag for Tex hunting and doing that with up and down arrows or something (I did not know about this either) 5. Anything else like this
There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file? Things like:
1. The XXXXXXX.txt.1 trick (which by the way I used in Divinity Original Sin, so it does work, if you want to look at an example)
2. The .ps trick described above, and what it is useful for
3. Shader hunting VS for a given PS (DarkStarSword posted that, I did not know about it) but I can't remember how that works
4. Setting the flag for Tex hunting and doing that with up and down arrows or something (I did not know about this either)
5. Anything else like this

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

Posted 12/16/2014 07:21 PM   
Indeed the information DarkStarSword gave us were very useful and especially comprehensible even for me with my limited experiences. So I hope the "classroom" was the right place to talk about it - sorry bo3b for capturing Your topic :S I didn't expect that my "simple" question about pushing the HUD to depth would grow this way. With FF XIII-2 I stumbled across another phenomenon (not a severe issue) but I will ask about it here: https://forums.geforce.com/default/topic/513190/3d-vision/how-to-fix-disable-shaders-in-games-dll-guide-and-fixes-/161/ Again many thanks for the help!
Indeed the information DarkStarSword gave us were very useful and especially comprehensible even for me with my limited experiences. So I hope the "classroom" was the right place to talk about it - sorry bo3b for capturing Your topic :S I didn't expect that my "simple" question about pushing the HUD to depth would grow this way. With FF XIII-2 I stumbled across another phenomenon (not a severe issue) but I will ask about it here: https://forums.geforce.com/default/topic/513190/3d-vision/how-to-fix-disable-shaders-in-games-dll-guide-and-fixes-/161/
Again many thanks for the help!

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

Posted 12/16/2014 11:28 PM   
[quote="mike_ar69"]There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file?[/quote] I've added an advanced techniques, tips and tricks section for this. Would you mind taking a look at the XXXXXXXX.txt.1 section ("2.3 Overriding an Individual Instance of a Shader") and fleshing it out a bit? That is not something I've used yet, so I haven't written much about it an I'm not sure what I have written is correct. I know the original post this was documented in mentioned there is something to look for in the LOG.txt - if you're able to add an example of what that looks like that would be awesome :)
mike_ar69 said:There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file?

I've added an advanced techniques, tips and tricks section for this. Would you mind taking a look at the XXXXXXXX.txt.1 section ("2.3 Overriding an Individual Instance of a Shader") and fleshing it out a bit? That is not something I've used yet, so I haven't written much about it an I'm not sure what I have written is correct. I know the original post this was documented in mentioned there is something to look for in the LOG.txt - if you're able to add an example of what that looks like that would be awesome :)

2x Geforce GTX 980 in SLI provided by NVIDIA, i7 6700K 4GHz CPU, Asus 27" VG278HE 144Hz 3D Monitor, BenQ W1070 3D Projector, 120" Elite Screens YardMaster 2, 32GB Corsair DDR4 3200MHz RAM, Samsung 850 EVO 500G SSD, 4x750GB HDD in RAID5, Gigabyte Z170X-Gaming 7 Motherboard, Corsair Obsidian 750D Airflow Edition Case, Corsair RM850i PSU, HTC Vive, Win 10 64bit

Alienware M17x R4 w/ built in 3D, Intel i7 3740QM, GTX 680m 2GB, 16GB DDR3 1600MHz RAM, Win7 64bit, 1TB SSD, 1TB HDD, 750GB HDD

Pre-release 3D fixes, shadertool.py and other goodies: http://github.com/DarkStarSword/3d-fixes
Support me on Patreon: https://www.patreon.com/DarkStarSword or PayPal: https://www.paypal.me/DarkStarSword

Posted 12/17/2014 01:46 AM   
[quote="DarkStarSword"][quote="mike_ar69"]There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file?[/quote] I've added an advanced techniques, tips and tricks section for this. Would you mind taking a look at the XXXXXXXX.txt.1 section ("2.3 Overriding an Individual Instance of a Shader") and fleshing it out a bit? That is not something I've used yet, so I haven't written much about it an I'm not sure what I have written is correct. I know the original post this was documented in mentioned there is something to look for in the LOG.txt - if you're able to add an example of what that looks like that would be awesome :)[/quote] Will do when I get a space this week :-)
DarkStarSword said:
mike_ar69 said:There's been some really good explanations in this thread recently for how the helix wrapper works, can you guys be sure to put this on that page that was created for documenting the ini file?

I've added an advanced techniques, tips and tricks section for this. Would you mind taking a look at the XXXXXXXX.txt.1 section ("2.3 Overriding an Individual Instance of a Shader") and fleshing it out a bit? That is not something I've used yet, so I haven't written much about it an I'm not sure what I have written is correct. I know the original post this was documented in mentioned there is something to look for in the LOG.txt - if you're able to add an example of what that looks like that would be awesome :)

Will do when I get a space this week :-)

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

Posted 12/17/2014 05:36 AM   
How much a semester?
How much a semester?

Posted 12/17/2014 09:08 PM   
It's totally free, just go to http://wiki.bo3b.net/index.php?title=Bo3b%27s_School_for_Shaderhackers

Posted 12/18/2014 12:08 AM   
Sorry for hijacking this thread but I thought it was the right place to ask our resident programmers! Please forgive my ignorance!!! Questions: How hard is it to remove a shader in 3Dmigoto? Is it a procedure that can be followed? How tricky would it be for our programmers to write a simple, text based user interface (building on the present one) for either Helix or 3Dmigoto which might make it less opaque for noobs?? Could you also add some basic functionality to it easier for noobs too e.g. cycle selected shaders etc.? Thanks!
Sorry for hijacking this thread but I thought it was the right place to ask our resident programmers!
Please forgive my ignorance!!!

Questions:
How hard is it to remove a shader in 3Dmigoto? Is it a procedure that can be followed?

How tricky would it be for our programmers to write a simple, text based user interface (building on the present one) for either Helix or 3Dmigoto which might make it less opaque for noobs?? Could you also add some basic functionality to it easier for noobs too e.g. cycle selected shaders etc.?

Thanks!

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

Posted 12/21/2014 08:02 PM   
While I haven't tried it myself, I believe the procedure is effectively identical to doing it in Helixmod (and this is documented in the school)
While I haven't tried it myself, I believe the procedure is effectively identical to doing it in Helixmod (and this is documented in the school)

Posted 12/22/2014 05:02 AM   
Awesome! Thanks. Even I can do that! :) The link to 3dmigoto in helix looks like it has expired. Any ideas where one can pick it up?
Awesome! Thanks. Even I can do that! :)

The link to 3dmigoto in helix looks like it has expired. Any ideas where one can pick it up?

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

Posted 12/22/2014 07:38 AM   
https://github.com/bo3b/3Dmigoto/releases/tag/0.99.18-beta

Posted 12/22/2014 07:38 AM   
Nice. Thanks! :)
Nice. Thanks! :)

Lord, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.-------------------Vitals: Windows 10 64bit, Ryzen 5 2600x, GTX 1070, 16GB, 3D Vision, CV1
Handy Driver DiscussionHelix Mod - community fixes Bo3b's Shaderhacker School - How to fix 3D in games3dsolutionsgaming.com - videos, reviews and 3D fixes

Posted 12/22/2014 07:44 AM   
  22 / 88    
Scroll To Top