How to fix/disable shaders in games(DLL,guide and fixes).
  164 / 167    
Thanks 4everAwake. That worked perfectly. This language is making a little more sense now. I was able to apply that to all of the vertex shaders for the hud. Now I can turn everything on / off with a key press. Now I just have one problem. How do I get Mana84's ShaderConverter.exe tool to work with pixel shaders? Typing: "ShaderConverter.exe 12345678.txt" in the command line worked for converting vertex shaders. Do I need to do something else for the pixel shaders? I'm talking about the tool referred to on this page: [url]https://forums.geforce.com/default/topic/600445/3d-vision/binarysearchengine-for-use-with-helix-mod-debug/[/url] Alternatively, how do I get DarkStarSword's shadertool.py file to work? I've tried it with Python 2.5 and Python 2.7. Python 3.5 wouldn't run at all. I keep getting syntax errors. An example of how to convert a pixel shader from version 2_0 to 3_0 using it would be very helpful. [url]https://github.com/DarkStarSword/3d-fixes#shadertoolpy[/url]
Thanks 4everAwake.

That worked perfectly. This language is making a little more sense now. I was able to apply that to all of the vertex shaders for the hud. Now I can turn everything on / off with a key press.

Now I just have one problem. How do I get Mana84's ShaderConverter.exe tool to work with pixel shaders? Typing: "ShaderConverter.exe 12345678.txt" in the command line worked for converting vertex shaders. Do I need to do something else for the pixel shaders? I'm talking about the tool referred to on this page: https://forums.geforce.com/default/topic/600445/3d-vision/binarysearchengine-for-use-with-helix-mod-debug/

Alternatively, how do I get DarkStarSword's shadertool.py file to work? I've tried it with Python 2.5 and Python 2.7. Python 3.5 wouldn't run at all. I keep getting syntax errors. An example of how to convert a pixel shader from version 2_0 to 3_0 using it would be very helpful.
https://github.com/DarkStarSword/3d-fixes#shadertoolpy

Posted 03/24/2015 10:58 PM   
Mana's tool only works on vertex shaders. My tool can upgrade ps_2_0 shaders (older ones like ps_1_1 would not be hard to add if needed, but I need some good examples of these to make sure I get the it right). You cannot run it with Python 2.x as it's written for Python 3 and the language has changed significantly since Python 2, so it may as well be a completely different language. Python 3.5 is alpha I think - you should be using Python 3.4.3 from here: https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi or the 32bit version: https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi
Mana's tool only works on vertex shaders. My tool can upgrade ps_2_0 shaders (older ones like ps_1_1 would not be hard to add if needed, but I need some good examples of these to make sure I get the it right).

You cannot run it with Python 2.x as it's written for Python 3 and the language has changed significantly since Python 2, so it may as well be a completely different language.

Python 3.5 is alpha I think - you should be using Python 3.4.3 from here:
https://www.python.org/ftp/python/3.4.3/python-3.4.3.amd64.msi
or the 32bit version:
https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi

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 03/24/2015 11:19 PM   
Python 3.4.3 installed and loads, but when I try to run your python script I get this error: line 5, in <module> import shaderutil ImportError: No module named 'shaderutil' What causes that? Can you provide instructions on how to use your shadertool.py file (showing syntax, file requirements, etc)? Can you create an example by converting this pixel shader from 2_0 to 3_0? [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656 // Game = Fear 2 // Shader CRC = 2D8FD433.txt // Shader Effect = Film Grain // // Parameters: // // float k_fFilmGrain; // float k_fFilmGrain_Scale; // sampler2D sCurFrameMapSampler; // sampler2D sNoiseTextureSampler; // // // Registers: // // Name Reg Size // -------------------- ----- ---- // k_fFilmGrain c0 1 // k_fFilmGrain_Scale c1 1 // sNoiseTextureSampler s0 1 // sCurFrameMapSampler s1 1 // // // Default values: // // k_fFilmGrain // c0 = { 0.2, 0, 0, 0 }; // // k_fFilmGrain_Scale // c1 = { 5, 0, 0, 0 }; // ps_2_x def c2, -0.5, 0.5, 2, 1 def c3, 0, 0, 0, 0 dcl t0.xy dcl_2d s0 dcl_2d s1 add r0.xy, t0, c2.x mul r0.zw, r0.wzyx, c1.x mov r1.w, c2.y mad r0.xy, r0, c1.x, r1.w mad r1.xy, r0.wzyx, c2.z, c2.y texld r0, r0, s0 texld r1, r1, s0 texld r2, t0, s1 mad r0.xyz, r0, r1, c2.x min r1.xyz, r2, c2.w mad r0.xyz, r0, c0.x, r1 mov r0.w, c3.x mov oC0, r0 // approximately 13 instruction slots used (3 texture, 10 arithmetic) [/code]
Python 3.4.3 installed and loads, but when I try to run your python script I get this error:

line 5, in <module>
import shaderutil
ImportError: No module named 'shaderutil'


What causes that?
Can you provide instructions on how to use your shadertool.py file (showing syntax, file requirements, etc)? Can you create an example by converting this pixel shader from 2_0 to 3_0?

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656
// Game = Fear 2
// Shader CRC = 2D8FD433.txt
// Shader Effect = Film Grain
//
// Parameters:
//
// float k_fFilmGrain;
// float k_fFilmGrain_Scale;
// sampler2D sCurFrameMapSampler;
// sampler2D sNoiseTextureSampler;
//
//
// Registers:
//
// Name Reg Size
// -------------------- ----- ----
// k_fFilmGrain c0 1
// k_fFilmGrain_Scale c1 1
// sNoiseTextureSampler s0 1
// sCurFrameMapSampler s1 1
//
//
// Default values:
//
// k_fFilmGrain
// c0 = { 0.2, 0, 0, 0 };
//
// k_fFilmGrain_Scale
// c1 = { 5, 0, 0, 0 };
//

ps_2_x
def c2, -0.5, 0.5, 2, 1
def c3, 0, 0, 0, 0
dcl t0.xy
dcl_2d s0
dcl_2d s1
add r0.xy, t0, c2.x
mul r0.zw, r0.wzyx, c1.x
mov r1.w, c2.y
mad r0.xy, r0, c1.x, r1.w
mad r1.xy, r0.wzyx, c2.z, c2.y
texld r0, r0, s0
texld r1, r1, s0
texld r2, t0, s1
mad r0.xyz, r0, r1, c2.x
min r1.xyz, r2, c2.w
mad r0.xyz, r0, c0.x, r1
mov r0.w, c3.x
mov oC0, r0

// approximately 13 instruction slots used (3 texture, 10 arithmetic)

Posted 03/25/2015 12:57 AM   
That's a ps_2_x shader, which my script didn't support until just a few seconds ago, so be sure to download it again :) I've just set it to use the same conversion as ps_2_0 shaders, which I think will work - but let me know if you find any issues in the converted version. You need both shadertool.py and shaderutil.py from here: https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/shadertool.py https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/shaderutil.py Here is a complete command line that will convert a shader to ps_3_0 and copy and rename it to the correct spot in the ShaderOverride directory - this is expected to be used on a shader in the Dumps directory: (NOTE that I've had to put a space into pytho n.exe, as it was somehow triggering Incapsula's spam protection on this forum) [code]C:\>c:\Python34\pytho n.exe c:\cygwin\home\dss\3d-fixes\shadertool.py --install "c:\Steam\SteamApps\common\The Forest\Dumps\SingleShaders\PixelShader\PixelShader_36_CRC32_2BEEDA8E.txt" parsing c:\Steam\SteamApps\common\The Forest\Dumps\SingleShaders\PixelShader\PixelShader_36_CRC32_2BEEDA8E.txt... Converting to Shader Model 3... Installing to Steam\SteamApps\common\The Forest\ShaderOverride\PixelShaders\2BEEDA8E.txt... [/code] The script will always convert shaders to shader model 3, unless it is explicitly disabled with --no-convert Note that if the shader is already in ShaderOverride, it will refuse to overwrite it unless you also specify --force If you have already copied the shader to ShaderOverride and want to use the script to modify that version directly you can pass --in-place (note that this is fine for converting shaders to shader model 3, but is not recommended to use on a shader that already has a fix) Run the script with --help to see the rest of the options it supports.
That's a ps_2_x shader, which my script didn't support until just a few seconds ago, so be sure to download it again :)

I've just set it to use the same conversion as ps_2_0 shaders, which I think will work - but let me know if you find any issues in the converted version.

You need both shadertool.py and shaderutil.py from here:

https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/shadertool.py
https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/shaderutil.py

Here is a complete command line that will convert a shader to ps_3_0 and copy and rename it to the correct spot in the ShaderOverride directory - this is expected to be used on a shader in the Dumps directory:

(NOTE that I've had to put a space into pytho n.exe, as it was somehow triggering Incapsula's spam protection on this forum)

C:\>c:\Python34\pytho n.exe c:\cygwin\home\dss\3d-fixes\shadertool.py --install "c:\Steam\SteamApps\common\The Forest\Dumps\SingleShaders\PixelShader\PixelShader_36_CRC32_2BEEDA8E.txt"

parsing c:\Steam\SteamApps\common\The Forest\Dumps\SingleShaders\PixelShader\PixelShader_36_CRC32_2BEEDA8E.txt...
Converting to Shader Model 3...
Installing to Steam\SteamApps\common\The Forest\ShaderOverride\PixelShaders\2BEEDA8E.txt...


The script will always convert shaders to shader model 3, unless it is explicitly disabled with --no-convert

Note that if the shader is already in ShaderOverride, it will refuse to overwrite it unless you also specify --force

If you have already copied the shader to ShaderOverride and want to use the script to modify that version directly you can pass --in-place (note that this is fine for converting shaders to shader model 3, but is not recommended to use on a shader that already has a fix)

Run the script with --help to see the rest of the options it supports.

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 03/25/2015 01:59 AM   
Thanks DarkStarSword. I got it running and --in-place worked. ---Now a challenge--- Post edited: Never mind, I figured it out. I wanted to disable the slow-motion enemy glow / highlight in Fear 2. Here's what I'm talking about: [URL=http://img245.imagevenue.com/img.php?image=11180_fear2_slowmoglow_122_336lo.jpg][IMG]http://img245.imagevenue.com/loc336/th_11180_fear2_slowmoglow_122_336lo.jpg[/IMG][/URL] I thought this shader was responsible. I was correct. [code]// // Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656 // // Game - Fear 2 // CRC - 7D6FBC65.txt // Effect - I think: character, enemy, and weapon lighting // // Parameters: // // float k_fMaxSpecularPower; // float k_fRimPower; // float k_fRimScale; // float2 k_vHDRRangeAndExposure; // float4 k_vObjectLightColor; // float4 k_vSpecularColor; // sampler2D sDiffuseMapSampler; // sampler2D sNormalMapSampler; // sampler2D sRimMapSampler; // sampler2D sSpecularMapSampler; // sampler2D sStaticLightVolume_XNegSampler; // sampler2D sStaticLightVolume_XPosSampler; // sampler2D sStaticLightVolume_YNegSampler; // sampler2D sStaticLightVolume_YPosSampler; // sampler2D sStaticLightVolume_ZNegSampler; // sampler2D sStaticLightVolume_ZPosSampler; // // // Registers: // // Name Reg Size // ------------------------------ ----- ---- // k_fMaxSpecularPower c0 1 // k_fRimPower c1 1 // k_fRimScale c2 1 // k_vHDRRangeAndExposure c3 1 // k_vObjectLightColor c4 1 // k_vSpecularColor c5 1 // sDiffuseMapSampler s0 1 // sNormalMapSampler s1 1 // sRimMapSampler s2 1 // sSpecularMapSampler s3 1 // sStaticLightVolume_XNegSampler s4 1 // sStaticLightVolume_XPosSampler s5 1 // sStaticLightVolume_YNegSampler s6 1 // sStaticLightVolume_YPosSampler s7 1 // sStaticLightVolume_ZNegSampler s8 1 // sStaticLightVolume_ZPosSampler s9 1 // // // Default values: // // k_fMaxSpecularPower // c0 = { 64, 0, 0, 0 }; // // k_fRimPower // c1 = { 1, 0, 0, 0 }; // // k_fRimScale // c2 = { 1, 0, 0, 0 }; // // k_vHDRRangeAndExposure // c3 = { 0, 0, 0, 0 }; // // k_vObjectLightColor // c4 = { 0, 0, 0, 0 }; // // k_vSpecularColor // c5 = { 0, 0, 0, 0 }; // ps_3_0 // Converted from ps_2_x with DarkStarSword's shadertool.py def c6, 2, -1, 1, 0 def c7, 0.300000012, 0.589999974, 0.109999999, 0 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xyz dcl_texcoord3 v3.xyz dcl_centroid v4.xyz dcl_centroid v5.xyz dcl_centroid v6.xyz dcl_2d s0 dcl_2d s1 dcl_2d s2 dcl_2d s3 dcl_volume s4 dcl_volume s5 dcl_volume s6 dcl_volume s7 dcl_volume s8 dcl_volume s9 texld r0, v0, s1 texld r1, v0, s3 texld r2, v1, s7 texld r3, v1, s5 texld r4, v1, s9 texld r5, v1, s4 texld r6, v1, s6 texld r7, v1, s8 texld r8, v0, s2 texld r9, v0, s0 mad r0.x, r0.y, c6.x, c6.y mad r0.y, r0.w, c6.x, c6.y mad r0.w, r0.x, -r0.x, c6.z mad r0.w, r0.y, -r0.y, r0.w rsq r0.w, r0.w rcp r0.z, r0.w nrm r10.xyz, r0 dp3 r0.x, v4, r10 dp3 r0.y, v5, r10 dp3 r0.z, v6, r10 nrm r11.xyz, r0 add r0.xyz, r11, r11 nrm r12.xyz, v3 dp3 r0.w, r12, r11 mad r0.xyz, r0, -r0.w, r12 mov_sat r12.xyz, -r0 mov_sat r0.xyz, r0 log r13.x, r12.x log r13.y, r12.y log r13.z, r12.z mul r0.w, r1.w, c5.w mul r0.w, r0.w, c0.x mul r12.xyz, r13, r0.w exp r1.w, r12.x exp r2.w, r12.y exp r3.w, r12.z mul r12.xyz, r2, r2.w mad r12.xyz, r3, r1.w, r12 mad r12.xyz, r4, r3.w, r12 log r13.x, r0.x log r13.y, r0.y log r13.z, r0.z mul r0.xyz, r0.w, r13 exp r1.w, r0.x mad r12.xyz, r5, r1.w, r12 exp r1.w, r0.y exp r2.w, r0.z mad r0.xyz, r6, r1.w, r12 mad r0.xyz, r7, r2.w, r0 mul r0.xyz, r1, r0 mov_sat r1.xyz, -r11 mov_sat r11.xyz, r11 mul r5.xyz, r5, r1.x mad r3.xyz, r3, r11.x, r5 mad r2.xyz, r2, r11.y, r3 mad r2.xyz, r6, r1.y, r2 mad r2.xyz, r4, r11.z, r2 mad r1.xyz, r7, r1.z, r2 nrm r2.xyz, v2 dp3_sat r0.w, r10, r2 add r0.w, -r0.w, c6.z pow r1.w, r0.w, c1.x mul r0.w, r8.w, r1.w mad r2.xyz, r8, c2.x, -r9 mad r2.xyz, r0.w, r2, r9 mul r1.xyz, r1, r2 mul r1.xyz, r1, c4 mad r0.xyz, r0, c5, r1 dp3 r1.x, r0, c7 mul r0.w, r1.x, c3.x mov oC0, r0 // approximately 81 instruction slots used (10 texture, 71 arithmetic) [/code]
Thanks DarkStarSword. I got it running and --in-place worked.

---Now a challenge---

Post edited: Never mind, I figured it out. I wanted to disable the slow-motion enemy glow / highlight in Fear 2.

Here's what I'm talking about:
Image


I thought this shader was responsible. I was correct.


//
// Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656
//
// Game - Fear 2
// CRC - 7D6FBC65.txt
// Effect - I think: character, enemy, and weapon lighting
//
// Parameters:
//
// float k_fMaxSpecularPower;
// float k_fRimPower;
// float k_fRimScale;
// float2 k_vHDRRangeAndExposure;
// float4 k_vObjectLightColor;
// float4 k_vSpecularColor;
// sampler2D sDiffuseMapSampler;
// sampler2D sNormalMapSampler;
// sampler2D sRimMapSampler;
// sampler2D sSpecularMapSampler;
// sampler2D sStaticLightVolume_XNegSampler;
// sampler2D sStaticLightVolume_XPosSampler;
// sampler2D sStaticLightVolume_YNegSampler;
// sampler2D sStaticLightVolume_YPosSampler;
// sampler2D sStaticLightVolume_ZNegSampler;
// sampler2D sStaticLightVolume_ZPosSampler;
//
//
// Registers:
//
// Name Reg Size
// ------------------------------ ----- ----
// k_fMaxSpecularPower c0 1
// k_fRimPower c1 1
// k_fRimScale c2 1
// k_vHDRRangeAndExposure c3 1
// k_vObjectLightColor c4 1
// k_vSpecularColor c5 1
// sDiffuseMapSampler s0 1
// sNormalMapSampler s1 1
// sRimMapSampler s2 1
// sSpecularMapSampler s3 1
// sStaticLightVolume_XNegSampler s4 1
// sStaticLightVolume_XPosSampler s5 1
// sStaticLightVolume_YNegSampler s6 1
// sStaticLightVolume_YPosSampler s7 1
// sStaticLightVolume_ZNegSampler s8 1
// sStaticLightVolume_ZPosSampler s9 1
//
//
// Default values:
//
// k_fMaxSpecularPower
// c0 = { 64, 0, 0, 0 };
//
// k_fRimPower
// c1 = { 1, 0, 0, 0 };
//
// k_fRimScale
// c2 = { 1, 0, 0, 0 };
//
// k_vHDRRangeAndExposure
// c3 = { 0, 0, 0, 0 };
//
// k_vObjectLightColor
// c4 = { 0, 0, 0, 0 };
//
// k_vSpecularColor
// c5 = { 0, 0, 0, 0 };
//

ps_3_0 // Converted from ps_2_x with DarkStarSword's shadertool.py
def c6, 2, -1, 1, 0
def c7, 0.300000012, 0.589999974, 0.109999999, 0
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xyz
dcl_texcoord3 v3.xyz
dcl_centroid v4.xyz
dcl_centroid v5.xyz
dcl_centroid v6.xyz
dcl_2d s0
dcl_2d s1
dcl_2d s2
dcl_2d s3
dcl_volume s4
dcl_volume s5
dcl_volume s6
dcl_volume s7
dcl_volume s8
dcl_volume s9
texld r0, v0, s1
texld r1, v0, s3
texld r2, v1, s7
texld r3, v1, s5
texld r4, v1, s9
texld r5, v1, s4
texld r6, v1, s6
texld r7, v1, s8
texld r8, v0, s2
texld r9, v0, s0
mad r0.x, r0.y, c6.x, c6.y
mad r0.y, r0.w, c6.x, c6.y
mad r0.w, r0.x, -r0.x, c6.z
mad r0.w, r0.y, -r0.y, r0.w
rsq r0.w, r0.w
rcp r0.z, r0.w
nrm r10.xyz, r0
dp3 r0.x, v4, r10
dp3 r0.y, v5, r10
dp3 r0.z, v6, r10
nrm r11.xyz, r0
add r0.xyz, r11, r11
nrm r12.xyz, v3
dp3 r0.w, r12, r11
mad r0.xyz, r0, -r0.w, r12
mov_sat r12.xyz, -r0
mov_sat r0.xyz, r0
log r13.x, r12.x
log r13.y, r12.y
log r13.z, r12.z
mul r0.w, r1.w, c5.w
mul r0.w, r0.w, c0.x
mul r12.xyz, r13, r0.w
exp r1.w, r12.x
exp r2.w, r12.y
exp r3.w, r12.z
mul r12.xyz, r2, r2.w
mad r12.xyz, r3, r1.w, r12
mad r12.xyz, r4, r3.w, r12
log r13.x, r0.x
log r13.y, r0.y
log r13.z, r0.z
mul r0.xyz, r0.w, r13
exp r1.w, r0.x
mad r12.xyz, r5, r1.w, r12
exp r1.w, r0.y
exp r2.w, r0.z
mad r0.xyz, r6, r1.w, r12
mad r0.xyz, r7, r2.w, r0
mul r0.xyz, r1, r0
mov_sat r1.xyz, -r11
mov_sat r11.xyz, r11
mul r5.xyz, r5, r1.x
mad r3.xyz, r3, r11.x, r5
mad r2.xyz, r2, r11.y, r3
mad r2.xyz, r6, r1.y, r2
mad r2.xyz, r4, r11.z, r2
mad r1.xyz, r7, r1.z, r2
nrm r2.xyz, v2
dp3_sat r0.w, r10, r2
add r0.w, -r0.w, c6.z
pow r1.w, r0.w, c1.x
mul r0.w, r8.w, r1.w
mad r2.xyz, r8, c2.x, -r9
mad r2.xyz, r0.w, r2, r9
mul r1.xyz, r1, r2
mul r1.xyz, r1, c4
mad r0.xyz, r0, c5, r1
dp3 r1.x, r0, c7
mul r0.w, r1.x, c3.x
mov oC0, r0


// approximately 81 instruction slots used (10 texture, 71 arithmetic)

Posted 03/27/2015 12:41 AM   
I've spotted a conversion issue in that shader: [quote="hudfreegamer"][code]... dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xyz dcl_texcoord3 v3.xyz dcl_centroid v4.xyz dcl_centroid v5.xyz dcl_centroid v6.xyz ...[/code][/quote]The centroid modifiers on those declarations weren't handled by the script, it should be: [code]dcl_texcoord v0.xy dcl_texcoord1 v1.xyz dcl_texcoord2 v2.xyz dcl_texcoord3 v3.xyz dcl_texcoord4_centroid v4.xyz dcl_texcoord5_centroid v5.xyz dcl_texcoord6_centroid v6.xyz [/code] I've updated the script to handle this case in future.
I've spotted a conversion issue in that shader:

hudfreegamer said:
...
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xyz
dcl_texcoord3 v3.xyz
dcl_centroid v4.xyz
dcl_centroid v5.xyz
dcl_centroid v6.xyz
...
The centroid modifiers on those declarations weren't handled by the script, it should be:

dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
dcl_texcoord2 v2.xyz
dcl_texcoord3 v3.xyz
dcl_texcoord4_centroid v4.xyz
dcl_texcoord5_centroid v5.xyz
dcl_texcoord6_centroid v6.xyz

I've updated the script to handle this case in future.

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 03/27/2015 03:05 AM   
Please test my Fear 2 Toggle Hud mod and let me know if it works for you. It also reduces the slow-mo enemy glow effect. --Note: untested in 3d Special thanks to 4everAwake and DarkStarSword for their help. Here's the DL link: [url]http://ge.tt/1MzxYHD2/v/0[/url] Post edited and link updated to include changes recommended in the next post by TsaebehT.
Please test my Fear 2 Toggle Hud mod and let me know if it works for you.
It also reduces the slow-mo enemy glow effect.

--Note: untested in 3d


Special thanks to 4everAwake and DarkStarSword for their help.


Here's the DL link: http://ge.tt/1MzxYHD2/v/0
Post edited and link updated to include changes recommended in the next post by TsaebehT.

Posted 03/29/2015 03:31 AM   
In your ReadMe it says that it's bound to the 0(48) key but it's actually not it's bound to the Q(81) key instead, aside from that it seems to work ok in SP but not in local(online?) MP, disables text but not other HUD overlay Shader(s). I'd also suggest the best way of 'disabling(without deleting)' it is to rename the d3d9.dll to something like _d3d9.dll, this way it's actually disabling the dll ... could even include a disable/enable script(_Disable.bat) like so: [code]@Echo Off if Exist "d3d9.dll" ( Ren "d3d9.dll" "_d3d9.dll"&&Ren %0 "_Enable.bat" ) else ( if Exist "_d3d9.dll" ( Ren "_d3d9.dll" "d3d9.dll"&&Ren %0 "_Disable.bat" ))[/code]
In your ReadMe it says that it's bound to the 0(48) key but it's actually not it's bound to the Q(81) key instead, aside from that it seems to work ok in SP but not in local(online?) MP, disables text but not other HUD overlay Shader(s).

I'd also suggest the best way of 'disabling(without deleting)' it is to rename the d3d9.dll to something like _d3d9.dll, this way it's actually disabling the dll ... could even include a disable/enable script(_Disable.bat) like so:

@Echo Off
if Exist "d3d9.dll" (
Ren "d3d9.dll" "_d3d9.dll"&&Ren %0 "_Enable.bat"
) else (
if Exist "_d3d9.dll" (
Ren "_d3d9.dll" "d3d9.dll"&&Ren %0 "_Disable.bat"
))
Posted 03/29/2015 05:10 AM   
Thanks. I updated the original post with a new link, corrected the default key code, mentioned that it only works in Single Player, and included that _Disable.bat file.
Thanks. I updated the original post with a new link, corrected the default key code, mentioned that it only works in Single Player, and included that _Disable.bat file.

Posted 03/29/2015 06:12 PM   
How do I disable only part of a pixel shader? If I disable the whole pixel shader, it removes more than I want it to. Would that be called fixing a pixel shader? Someone saw my mod to toggle the hud in Fear 2 and asked if I could just disable the outer frame. However, when I disable the shader, it removes the outer frame and the health/armor bars too, which he wanted to keep. [code] // // Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656 // // Game - Fear 2 // CRC - 093C746D.txt // Effect - disables outer frame of hud and health / armor bars // // Parameters: // // row_major float4x4 k_mGFxTransform; // sampler2D sGFxTexture1Sampler; // // // Registers: // // Name Reg Size // ------------------- ----- ---- // k_mGFxTransform c0 4 // sGFxTexture1Sampler s0 1 // // // Default values: // // k_mGFxTransform // c0 = { 0, 0, 0, 0 }; // c1 = { 0, 0, 0, 0 }; // c2 = { 0, 0, 0, 0 }; // c3 = { 0, 0, 0, 0 }; // ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py dcl_color v0 dcl_color1 v1 dcl_texcoord v2.xy dcl_2d s0 texld r0, v2, s0 add r0, r0, -v0 mov r1, v0 mad r0, v1.z, r0, r1 mov r1, c2 mad r0, r0, r1, c3 mul r0.w, r0.w, v1.w mov oC0, r0 // approximately 8 instruction slots used (1 texture, 7 arithmetic) [/code]
How do I disable only part of a pixel shader? If I disable the whole pixel shader, it removes more than I want it to.

Would that be called fixing a pixel shader? Someone saw my mod to toggle the hud in Fear 2 and asked if I could just disable the outer frame. However, when I disable the shader, it removes the outer frame and the health/armor bars too, which he wanted to keep.

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.24.950.2656
//
// Game - Fear 2
// CRC - 093C746D.txt
// Effect - disables outer frame of hud and health / armor bars
//
// Parameters:
//
// row_major float4x4 k_mGFxTransform;
// sampler2D sGFxTexture1Sampler;
//
//
// Registers:
//
// Name Reg Size
// ------------------- ----- ----
// k_mGFxTransform c0 4
// sGFxTexture1Sampler s0 1
//
//
// Default values:
//
// k_mGFxTransform
// c0 = { 0, 0, 0, 0 };
// c1 = { 0, 0, 0, 0 };
// c2 = { 0, 0, 0, 0 };
// c3 = { 0, 0, 0, 0 };
//

ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py
dcl_color v0
dcl_color1 v1
dcl_texcoord v2.xy
dcl_2d s0
texld r0, v2, s0
add r0, r0, -v0
mov r1, v0
mad r0, v1.z, r0, r1
mov r1, c2
mad r0, r0, r1, c3
mul r0.w, r0.w, v1.w
mov oC0, r0

// approximately 8 instruction slots used (1 texture, 7 arithmetic)

Posted 04/02/2015 08:20 PM   
To do that partial disable approach, you'll need to separate the textures that the pixel shader draws. The pixel shaders are often used for multiple items, and you get at those multiple pieces by texture. Take a look at DarkStarSwords' documentation for the separation by texture feature: [url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Texture_Hunting_and_Filtering[/url] You should be able to find just the outer frame and allow the health bars to draw. Keep in mind that you can 'whitelist' OR 'blacklist' textures, whichever is easier. If you only want to disable a single one, blacklisting is easier. If you only wanted to keep a single one, whitelisting would be easier.
To do that partial disable approach, you'll need to separate the textures that the pixel shader draws. The pixel shaders are often used for multiple items, and you get at those multiple pieces by texture.

Take a look at DarkStarSwords' documentation for the separation by texture feature:

http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Texture_Hunting_and_Filtering


You should be able to find just the outer frame and allow the health bars to draw. Keep in mind that you can 'whitelist' OR 'blacklist' textures, whichever is easier. If you only want to disable a single one, blacklisting is easier. If you only wanted to keep a single one, whitelisting would be easier.

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 04/03/2015 11:02 AM   
If the Shader's CRC has multiple instances, usually you can see this with the Pixel Shaders when using DumpAll but it still holds true with Vertex Shaders, you can just disable(or modify) one of the instances instead of all of them. Just for example in Dwarf Quest on the title screen VS364BA958 controls the title and the white overlay text. If I add the original 364BA958.txt to the ShaderOverride and then 364BA958.txt.1 & 364BA958.txt.2, I can disable(or modify) the title via 364BA958.txt.1 and the white text via 364BA958.txt. Not sure if this method will work in your case but it is probably worth mentioning, with PSs you can generally see how many Dumped Shaders contain the CRC and know how many instances there are to fiddle with, with VSs it's a bit more tricky because most versions of the dll only dump a single file for each CRC so it takes a bit of trial an error, 364BA958.txt.1, 364BA958.txt.2, 364BA958.txt.3, etc. And they have to exist in the ShaderOverride folders before the game is run. Edit:Just drag and drop a Shader with a correctly formatted filename(364BA958.txt) onto the following code saved as _Instances.bat and run the game, it'll quickly create 9 instances for you to tinker with. :) [code]@Echo Off if [%~x1] == [.txt] ( For %%? in (1,2,3,4,5,6,7,8,9) do ( Copy "%~nx1" "%~nx1.%%?" ))[/code] edit:technically it looks like you can count how many times it uses the CRC in the LOG.txt. :)
If the Shader's CRC has multiple instances, usually you can see this with the Pixel Shaders when using DumpAll but it still holds true with Vertex Shaders, you can just disable(or modify) one of the instances instead of all of them.

Just for example in Dwarf Quest on the title screen VS364BA958 controls the title and the white overlay text.

If I add the original 364BA958.txt to the ShaderOverride and then 364BA958.txt.1 & 364BA958.txt.2, I can disable(or modify) the title via 364BA958.txt.1 and the white text via 364BA958.txt.

Not sure if this method will work in your case but it is probably worth mentioning, with PSs you can generally see how many Dumped Shaders contain the CRC and know how many instances there are to fiddle with, with VSs it's a bit more tricky because most versions of the dll only dump a single file for each CRC so it takes a bit of trial an error, 364BA958.txt.1, 364BA958.txt.2, 364BA958.txt.3, etc. And they have to exist in the ShaderOverride folders before the game is run.

Edit:Just drag and drop a Shader with a correctly formatted filename(364BA958.txt) onto the following code saved as _Instances.bat and run the game, it'll quickly create 9 instances for you to tinker with. :)

@Echo Off
if [%~x1] == [.txt] (
For %%? in (1,2,3,4,5,6,7,8,9) do (
Copy "%~nx1" "%~nx1.%%?"
))

edit:technically it looks like you can count how many times it uses the CRC in the LOG.txt. :)
Posted 04/03/2015 03:23 PM   
[quote="hudfreegamer"].[/quote] Hi. Are you the author of this site by any chance? http://hudfreegaming.wikia.com/wiki/HudFreeGaming_Wiki Then you might be interested by some HUD toggles I've done with Helixmod :) [url=http://www.mediafire.com/download/k57q9glkju09rkf/LostPlanetHUDToggle.rar]Lost Planet[/url] [url=http://www.mediafire.com/download/5i520sh1up6nhqp/LP2Hudtoggle.rar]Lost Planet 2[/url] [url=http://www.mediafire.com/download/9cod3ddgeoe6isi/FC3ToggleHUD.rar]Far Cry 3[/url] [url=http://www.mediafire.com/download/xbfvuq0cj0os838/wolverinefix.rar]X-men Origins: Wolverine[/url] (this one also removes a bunch of effects that I thought looked bad)
hudfreegamer said:.


Hi. Are you the author of this site by any chance?


http://hudfreegaming.wikia.com/wiki/HudFreeGaming_Wiki


Then you might be interested by some HUD toggles I've done with Helixmod :)

Lost Planet
Lost Planet 2
Far Cry 3
X-men Origins: Wolverine (this one also removes a bunch of effects that I thought looked bad)

1080 Ti - i7 5820k - 16Gb RAM - Win 10 version 1607 - ASUS VG236H (1920x1080@120Hz)

Posted 04/08/2015 07:00 PM   
Guys, Can somebody help me about disable HUDs? I can't use it. I'm bad users :( Maybe you can help me.
Guys, Can somebody help me about disable HUDs? I can't use it. I'm bad users :( Maybe you can help me.

Posted 01/24/2016 11:10 PM   
Guys, Can somebody help me about disable HUDs? I can't use it. I'm bad users :( Maybe you can help me.
Guys, Can somebody help me about disable HUDs? I can't use it. I'm bad users :( Maybe you can help me.

Posted 01/24/2016 11:11 PM   
  164 / 167    
Scroll To Top