How to fix/disable shaders in games(DLL,guide and fixes).
  125 / 167    
[quote="DHR"]L4D2 have one VS responsable for water (2.0 version) that manage multiple things + multiple PS for water (2.0 version)...i found the PS responsable for water halo only, but it's in 2.0 version...i know how to convert VS, but not PS..and i don't recall Helix posting something about it.[/quote]I think there is not much difference betwen ps_2 and ps_3. The input and output registers are at least very similar. Maybe go to this page to see key differences: [url]http://msdn.microsoft.com/en-us/library/windows/desktop/bb172920(v=vs.85).aspx[/url]
DHR said:L4D2 have one VS responsable for water (2.0 version) that manage multiple things + multiple PS for water (2.0 version)...i found the PS responsable for water halo only, but it's in 2.0 version...i know how to convert VS, but not PS..and i don't recall Helix posting something about it.
I think there is not much difference betwen ps_2 and ps_3. The input and output registers are at least very similar.

Maybe go to this page to see key differences:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172920(v=vs.85).aspx

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

Posted 05/16/2013 12:48 PM   
Does it only need converting, or does need to be converted /and/ fixed separately?
Does it only need converting, or does need to be converted /and/ fixed separately?

Posted 05/16/2013 01:14 PM   
First need to convert to 3.0 and later trying to fix.
First need to convert to 3.0 and later trying to fix.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

Like my fixes? you can donate to Paypal: dhr.donation@gmail.com

Posted 05/16/2013 01:28 PM   
[url]http://helixmod.blogspot.com/2013/05/vs11vs20-vs30-converter.html[/url]

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 05/16/2013 07:53 PM   
[quote="Pirateguybrush"]Does it only need converting, or does need to be converted /and/ fixed separately?[/quote]The reason it needs to be converted to 3.0 is because we need the if_eq type statements, and 2.0 doesn't support that. Converting is pretty straightforward though. Edit: Also needs to be converted because we typically need the stereo texture load mechanism, to get at the convergence and separation.
Pirateguybrush said:Does it only need converting, or does need to be converted /and/ fixed separately?
The reason it needs to be converted to 3.0 is because we need the if_eq type statements, and 2.0 doesn't support that. Converting is pretty straightforward though.

Edit: Also needs to be converted because we typically need the stereo texture load mechanism, to get at the convergence and separation.

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

Posted 05/16/2013 10:06 PM   
Before I post sanctum 2. Does anyone know about an ASCII code for left-ctrl [Sights are left ctrl in Sanctum 2. I know its wierd]. I dont think it has one let alone that its compatible with Helix's dll. I will probably have to set to a different key then include an optional AHK file to activate. I just wanted to make sure. Its not a huge deal if I must. EDIT: Nm. I kind of doubt its possible. It doesnt even seem to have a key since its used in conjunction with other keys. Ill post now, works fine with AHK.
Before I post sanctum 2. Does anyone know about an ASCII code for left-ctrl [Sights are left ctrl in Sanctum 2. I know its wierd]. I dont think it has one let alone that its compatible with Helix's dll. I will probably have to set to a different key then include an optional AHK file to activate. I just wanted to make sure. Its not a huge deal if I must.

EDIT: Nm. I kind of doubt its possible. It doesnt even seem to have a key since its used in conjunction with other keys. Ill post now, works fine with AHK.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 05/17/2013 12:37 AM   
[quote="eqzitara"]Before I post sanctum 2. Does anyone know about an ASCII code for left-ctrl [Sights are left ctrl in Sanctum 2. I know its wierd]. I dont think it has one let alone that its compatible with Helix's dll. I will probably have to set to a different key then include an optional AHK file to activate. I just wanted to make sure. Its not a huge deal if I must. EDIT: Nm. I kind of doubt its possible. It doesnt even seem to have a key since its used in conjunction with other keys. Ill post now, works fine with AHK.[/quote] Not sure if this'll help, I found this here [url]http://helixmod.wikispot.org/makeyourself[/url] but the link was broken, I'm pretty sure this is what it was supposed to be [url]http://msdn.microsoft.com/en-us/ms927178.aspx[/url] it has a listing for this: VK_LCONTROL 0xA2 Left CTRL
eqzitara said:Before I post sanctum 2. Does anyone know about an ASCII code for left-ctrl [Sights are left ctrl in Sanctum 2. I know its wierd]. I dont think it has one let alone that its compatible with Helix's dll. I will probably have to set to a different key then include an optional AHK file to activate. I just wanted to make sure. Its not a huge deal if I must.

EDIT: Nm. I kind of doubt its possible. It doesnt even seem to have a key since its used in conjunction with other keys. Ill post now, works fine with AHK.

Not sure if this'll help, I found this here http://helixmod.wikispot.org/makeyourself but the link was broken, I'm pretty sure this is what it was supposed to be http://msdn.microsoft.com/en-us/ms927178.aspx it has a listing for this:

VK_LCONTROL 0xA2 Left CTRL
Posted 05/17/2013 03:55 AM   
I can confirm that 0xA2=162 does in fact work. Left Control key.
I can confirm that 0xA2=162 does in fact work. Left Control key.

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

Posted 05/17/2013 05:39 AM   
[quote="Pirateguybrush"]Okay, here are the original shaders. [url]https://dl.dropboxusercontent.com/u/17425913/l4d2%20shaders.rar[/url] Here are the Portal 2 shaders [url]https://dl.dropboxusercontent.com/u/17425913/portal%202%20shaders.rar[/url] Here are the Dear Esther shaders [url]https://dl.dropboxusercontent.com/u/17425913/dear%20esther%20shaders.rar[/url] Let me know how you go![/quote]OK, I took a look here to see how these might line up. Short answer of course is that they are mostly different enough that I can't see a good way to make them line up. Too many differences in the global constants being passed in. With one exception. Try taking the Portal 2 shader #931 as a good working shader, and plug that code into the broken L4D2 shader #326. The code is very similar, same number of inputs and outputs. Same global constant registers being used. Slightly different in that Portal 2 shader use just ViewProj, and L4D2 shader uses a ModelViewProj, but it seems like the end result of oT2 might still be right. Try that as a first experiment to see it improves at all. I like to change only one variable at a time to help keep things clear.
Pirateguybrush said:Okay, here are the original shaders.
https://dl.dropboxusercontent.com/u/17425913/l4d2%20shaders.rar

Here are the Portal 2 shaders
https://dl.dropboxusercontent.com/u/17425913/portal%202%20shaders.rar


Here are the Dear Esther shaders
https://dl.dropboxusercontent.com/u/17425913/dear%20esther%20shaders.rar

Let me know how you go!
OK, I took a look here to see how these might line up.

Short answer of course is that they are mostly different enough that I can't see a good way to make them line up. Too many differences in the global constants being passed in.


With one exception. Try taking the Portal 2 shader #931 as a good working shader, and plug that code into the broken L4D2 shader #326.

The code is very similar, same number of inputs and outputs. Same global constant registers being used. Slightly different in that Portal 2 shader use just ViewProj, and L4D2 shader uses a ModelViewProj, but it seems like the end result of oT2 might still be right.

Try that as a first experiment to see it improves at all. I like to change only one variable at a time to help keep things clear.

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

Posted 05/17/2013 06:34 AM   
More, perhaps too much, detail on why this isn't totally insane. Here's the broken L4D2 shader and its inputs: [code]// Registers: // // Name Reg Size // ---------------------- ----- ---- // cEyePos_WaterHeightW c2 1 // cModelViewProj c4 4 // cFogParams c16 1 // cBumpTexCoordTransform c49 2 // cModel c58 3 // vs_2_0 dcl_position v0 dcl_texcoord v1 dcl_texcoord1 v2 [/code] Here's the working Portal 2 shader and its inputs: [code]// Registers: // // Name Reg Size // ---------------------- ----- ---- // cEyePos_WaterHeightW c2 1 // cViewProj c8 4 // cFogParams c16 1 // cBumpTexCoordTransform c49 2 // cModel c58 3 // vs_2_0 dcl_position v0 dcl_texcoord v1 dcl_texcoord1 v2 [/code] They are nearly identical, with only the change to the usual ModelViewProjection matrix. The ViewProj matric can always be multiplied by the Model matrix to give the MVP matrix, which is what happens in the code itself. The pixel shaders are further off, and may break the game, because they run after the vertex shaders. But usually they only apply coloring, not move vertex positions. And broken stereo effects are almost always position problems. The pixel shaders in the working examples are more complicated and have extra parameters that will not be available in L4D2.
More, perhaps too much, detail on why this isn't totally insane.

Here's the broken L4D2 shader and its inputs:
// Registers:
//
// Name Reg Size
// ---------------------- ----- ----
// cEyePos_WaterHeightW c2 1
// cModelViewProj c4 4
// cFogParams c16 1
// cBumpTexCoordTransform c49 2
// cModel c58 3
//

vs_2_0

dcl_position v0
dcl_texcoord v1
dcl_texcoord1 v2

Here's the working Portal 2 shader and its inputs:
// Registers:
//
// Name Reg Size
// ---------------------- ----- ----
// cEyePos_WaterHeightW c2 1
// cViewProj c8 4
// cFogParams c16 1
// cBumpTexCoordTransform c49 2
// cModel c58 3
//

vs_2_0

dcl_position v0
dcl_texcoord v1
dcl_texcoord1 v2


They are nearly identical, with only the change to the usual ModelViewProjection matrix. The ViewProj matric can always be multiplied by the Model matrix to give the MVP matrix, which is what happens in the code itself.


The pixel shaders are further off, and may break the game, because they run after the vertex shaders. But usually they only apply coloring, not move vertex positions. And broken stereo effects are almost always position problems.

The pixel shaders in the working examples are more complicated and have extra parameters that will not be available in L4D2.

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

Posted 05/17/2013 06:40 AM   
[quote="bo3b"]I can confirm that 0xA2=162 does in fact work. Left Control key.[/quote] O snap, I couldnt find it. Ty. I could only find left control + other keys. I thought it was a lost cause we didnt have all those keys in the old version. Spent like 20 mins on the AHK lol. Are you forwarding everything but what changes? C4-> C8? Im guessing modelviewproj is reflection of objects while other one doesnt do reflections or just like "world reflections[Sky maybe]" but not objects. TBH, im just worried its gonna turn into a jig saw puzzle. Like which pixel shader connects to which vertexshader, etc. Like are you getting actual results or is it just texcoords being disabled. Like if you turn off reflections/refractions the hl2 autoexec[May work in other source. I honestly forget]. Water has no issues. Not sure if anyone else knows this. It may be one of those things that didnt get written down over the years. r_WaterDrawReflection 0 r_WaterDrawRefraction 0
bo3b said:I can confirm that 0xA2=162 does in fact work. Left Control key.

O snap, I couldnt find it. Ty. I could only find left control + other keys. I thought it was a lost cause we didnt have all those keys in the old version. Spent like 20 mins on the AHK lol.


Are you forwarding everything but what changes? C4-> C8? Im guessing modelviewproj is reflection of objects while other one doesnt do reflections or just like "world reflections[Sky maybe]" but not objects.
TBH, im just worried its gonna turn into a jig saw puzzle. Like which pixel shader connects to which vertexshader, etc. Like are you getting actual results or is it just texcoords being disabled.

Like if you turn off reflections/refractions the hl2 autoexec[May work in other source. I honestly forget]. Water has no issues. Not sure if anyone else knows this. It may be one of those things that didnt get written down over the years.
r_WaterDrawReflection 0
r_WaterDrawRefraction 0

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 05/17/2013 07:44 AM   
[quote="bo3b"] The pixel shaders are further off, and may break the game, because they run after the vertex shaders. But usually they only apply coloring, not move vertex positions. And broken stereo effects are almost always position problems. The pixel shaders in the working examples are more complicated and have extra parameters that will not be available in L4D2. [/quote] I've been partially following this thread, so I might have missed a chunk, my apologies if I say something or that has been covered already. You need to be careful with this for two reasons. First is that MVP is very different to VP (VP is a 'global' matrix that applies to all objects, but "M" is different for each object since that is the one that 'moves' each model from the world origin to its actual location in world space), and you need to be sure this shader is referring to the same model for it to be applicable. I think Equzitara made a similar point above. Secondly, this might be - but I emphasize I don't know - a Pixel shader issue if any of this stuff is done using deferred rendering. The problem there is that the PS tries to 'recreate' world positions from screen positions and depth information by transforming back, but does not know about nvidias 'extra' stereo matrix that was applied after/with the Proj matrix before getting to the PS in the first place. In this case you need to fix the PS, or find a way to pass in stereo corrected texcoords from the VS. Finally a third aspect to this might be that Nvidias heuristics are just wrong and that - if a reflection map is used, say - all you need to do is change how that gets treated, either mono or stereo. I did this for Oblivion and Mana84 did this for ME2 - he was more selective in his fix, so you might want to look at the ME2 code with his fix on the HELIXmod site. This approach might be appropriate for the Prototype.exe profile (which I think is the one with bad reflections if I remember correctly). The upshot of all this waffle is that I think you need to track down the Pixel Shaders as well and have a good look at them - if they have things in like "InvViewProj" or "InvView", or if you can identify some of the coordinates are clearly World Coordinates, then you probably have some deferred rendering going on (but not necessarily responsible for thing you want to fix...). If they use reflectionmaps, try the approach that Mana84 used for ME2. I'll end this by saying again that I might have missed a chunk of this thread, and this might have been covered, but hopefully it gives a couple of ideas.
bo3b said:
The pixel shaders are further off, and may break the game, because they run after the vertex shaders. But usually they only apply coloring, not move vertex positions. And broken stereo effects are almost always position problems.

The pixel shaders in the working examples are more complicated and have extra parameters that will not be available in L4D2.

I've been partially following this thread, so I might have missed a chunk, my apologies if I say something or that has been covered already. You need to be careful with this for two reasons. First is that MVP is very different to VP (VP is a 'global' matrix that applies to all objects, but "M" is different for each object since that is the one that 'moves' each model from the world origin to its actual location in world space), and you need to be sure this shader is referring to the same model for it to be applicable. I think Equzitara made a similar point above. Secondly, this might be - but I emphasize I don't know - a Pixel shader issue if any of this stuff is done using deferred rendering. The problem there is that the PS tries to 'recreate' world positions from screen positions and depth information by transforming back, but does not know about nvidias 'extra' stereo matrix that was applied after/with the Proj matrix before getting to the PS in the first place. In this case you need to fix the PS, or find a way to pass in stereo corrected texcoords from the VS. Finally a third aspect to this might be that Nvidias heuristics are just wrong and that - if a reflection map is used, say - all you need to do is change how that gets treated, either mono or stereo. I did this for Oblivion and Mana84 did this for ME2 - he was more selective in his fix, so you might want to look at the ME2 code with his fix on the HELIXmod site. This approach might be appropriate for the Prototype.exe profile (which I think is the one with bad reflections if I remember correctly).
The upshot of all this waffle is that I think you need to track down the Pixel Shaders as well and have a good look at them - if they have things in like "InvViewProj" or "InvView", or if you can identify some of the coordinates are clearly World Coordinates, then you probably have some deferred rendering going on (but not necessarily responsible for thing you want to fix...). If they use reflectionmaps, try the approach that Mana84 used for ME2.
I'll end this by saying again that I might have missed a chunk of this thread, and this might have been covered, but hopefully it gives a couple of ideas.

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

Posted 05/17/2013 01:40 PM   
Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect!
Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect!

Posted 05/17/2013 03:56 PM   
[quote="nehuge"]Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect![/quote] Depending on the game, shadows might be fixable, but there are conditions. 1. Game must be DX9. 2. It's hard. 3. It's usually even harder than you first thought. 4. There are lots of ways of generating shadows, and hence different techniques to fix them, hence.. 5. It's even harder than you second thought. If this game uses an engine like UE3 or UDK (Unreal engines), you might be in luck - Helix wrote a script that fixes many Unreal Engine games (but not all). Otherwise, someone will have to invest a fair bit of time and brain power trying to fix it. Make no mistake, what Helix does fixing lighting and shadows and so on is exceptional and very impressive (a few other community users have done great work as well like Eqzitara and Mana84, and others).
nehuge said:Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect!

Depending on the game, shadows might be fixable, but there are conditions. 1. Game must be DX9. 2. It's hard. 3. It's usually even harder than you first thought. 4. There are lots of ways of generating shadows, and hence different techniques to fix them, hence.. 5. It's even harder than you second thought.
If this game uses an engine like UE3 or UDK (Unreal engines), you might be in luck - Helix wrote a script that fixes many Unreal Engine games (but not all). Otherwise, someone will have to invest a fair bit of time and brain power trying to fix it. Make no mistake, what Helix does fixing lighting and shadows and so on is exceptional and very impressive (a few other community users have done great work as well like Eqzitara and Mana84, and others).

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

Posted 05/17/2013 05:10 PM   
[quote="nehuge"]Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect![/quote] Physx wasnt fixed, it was Alice profile. *Sigh* Always a bridesmaid never a bride.
nehuge said:Does anyone have any ideas on Everquest 2? 3d is great (cursor at character depth, and then cursor changes to GUI depth when you hover over it) but requires you to turn all shadows off, hurting visual quality. Is there a way to leave shadows enabled and just fix them? Does this disabling of shaders utlity just get rid of shadows on games whose menus or .ini's don't let you? I wanna say rather than disabling a shader for Borderlands 2 for example, Helix was able to actually fix the PhysX effects from hurting your eyes. Any ideas anyone? If I could just enable shadows and not have them look weird and hurt my eyes the game would be perfect!

Physx wasnt fixed, it was Alice profile.

*Sigh* Always a bridesmaid never a bride.

Co-founder/Web host of helixmod.blog.com

Donations for web hosting @ paypal -eqzitara@yahoo.com
or
https://www.patreon.com/user?u=791918

Posted 05/17/2013 05:19 PM   
  125 / 167    
Scroll To Top