Bo3b's School For Shaderhackers
  34 / 87    
Pro-tip for hunting vertex shaders if you cannot avoid moving the camera and helix mod insists on crashing if you do (only applicable when using UseRenderedShaders=true): 1. Do not touch the vertex shader hunting keys just yet! If you have touched them, press numpad minus to reset. 2. Hunt the pixel shader for the effect - Helix mod seems 100% stable for pixel shader hunting. 3. Once you have the pixel shader disabled stop moving and do not touch the mouse/camera. In particularly complex scenes you may need to look at the ground or other simple geometry. If you are in a cutscene wait until it has finished playing out to ensure that the camera won't move. 4. CRASH ALERT - THIS STEP IS RISKY!!! SLOWLY start cycling the vertex shaders FORWARD. Going to fast to soon, or cycling backwards to the end of the list increases the risk of a crash. After a few seconds going slow, it seems relatively safe to go fast. If it crashes you will have to start over. 5. After you have cycled the vertex shaders AT LEAST ONCE, look at the number next to 'PixelPair' 6. Cycle the vertex shader to that same number 7. Dump out the vertex shader 8. Press minus on the numpad to reset the disabled shaders. You can now safely move around again. Note that in some cases the PixelPair may not be reliable and you might end up with the wrong shader (sometimes just off by one), but most of the time this works.
Pro-tip for hunting vertex shaders if you cannot avoid moving the camera and helix mod insists on crashing if you do (only applicable when using UseRenderedShaders=true):

1. Do not touch the vertex shader hunting keys just yet! If you have touched them, press numpad minus to reset.

2. Hunt the pixel shader for the effect - Helix mod seems 100% stable for pixel shader hunting.

3. Once you have the pixel shader disabled stop moving and do not touch the mouse/camera. In particularly complex scenes you may need to look at the ground or other simple geometry. If you are in a cutscene wait until it has finished playing out to ensure that the camera won't move.

4. CRASH ALERT - THIS STEP IS RISKY!!! SLOWLY start cycling the vertex shaders FORWARD. Going to fast to soon, or cycling backwards to the end of the list increases the risk of a crash. After a few seconds going slow, it seems relatively safe to go fast. If it crashes you will have to start over.

5. After you have cycled the vertex shaders AT LEAST ONCE, look at the number next to 'PixelPair'

6. Cycle the vertex shader to that same number

7. Dump out the vertex shader

8. Press minus on the numpad to reset the disabled shaders. You can now safely move around again.

Note that in some cases the PixelPair may not be reliable and you might end up with the wrong shader (sometimes just off by one), but most of the time this works.

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 04/27/2015 07:20 AM   
[quote="DarkStarSword"][quote]Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :([/quote]That is strange, but I think I may have seen similar things on occasion but could never reproduce it so I wasn't sure. It might be an indication that trying out different profiles may help: http://helixmod.blogspot.com.au/2013/03/how-to-change-3d-vision-profile-and.html[/quote]I've had a thought about this - if they lined up perfectly at one point it might be a driver heuristic that glitched on somehow. The most likely one for shadows is square surface creation mode, which you can force with Helix mod. Try adding this to DX9Settings.ini under [General]: [code] ; Force square surfaces (shadow maps) to be mono: DefSquareSurfaceMode = 2 [/code]
DarkStarSword said:
Today trying the game... I have got to see the shadows perfectly but when change the resolution, this fix lost. It's strange... :(
That is strange, but I think I may have seen similar things on occasion but could never reproduce it so I wasn't sure. It might be an indication that trying out different profiles may help:
http://helixmod.blogspot.com.au/2013/03/how-to-change-3d-vision-profile-and.html
I've had a thought about this - if they lined up perfectly at one point it might be a driver heuristic that glitched on somehow. The most likely one for shadows is square surface creation mode, which you can force with Helix mod. Try adding this to DX9Settings.ini under [General]:

; Force square surfaces (shadow maps) to be mono:
DefSquareSurfaceMode = 2

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 04/27/2015 07:41 AM   
Many, many thanks DarkStarSword for your help! I will try later the game with your changes in DX9Settings.ini Another weird bug is the blocked convergence... I have read in somewhere that is possible with Helix drivers force convergence in some games. I'll hunt the pixelshader and bring you his head.
Many, many thanks DarkStarSword for your help!

I will try later the game with your changes in DX9Settings.ini

Another weird bug is the blocked convergence... I have read in somewhere that is possible with Helix drivers force convergence in some games.

I'll hunt the pixelshader and bring you his head.

Posted 04/28/2015 05:03 PM   
You can try Chiri's convergence unlocker tool: http://helixmod.blogspot.com/2012/06/how-to-unlock-convergence-in-locked.html
You can try Chiri's convergence unlocker tool:


http://helixmod.blogspot.com/2012/06/how-to-unlock-convergence-in-locked.html

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 04/28/2015 06:29 PM   
Well... [b]Good news:[/b] - At last, shadows are fixed. Game now is almost perfect. I can play with shadows in very high. - Convergence fixed. Chiri's convergence unlocker works great with F12011 [b]Issues not fixed:[/b] - Bad depth for environment reflections on the road. - Little depth problem with shadows. This problem only happens in wet races [b]Minor issues:[/b] -Some Hud elements have wrong depth. For example other racers name popout a lot and is very annoying. I have disabled this, because this does not affect the gameplay. Perhaps fix this shader is a good start to learn. [b]Very minor issue:[/b] - Shadows cast wrong over NPC. Only visible this issue in paddock and intro. I am very happy with this progress :) I have located some pixel shaders with your pro-tip hunting method. Need some days more to investigate it properly. Many thanks for your help!
Well...

Good news:

- At last, shadows are fixed. Game now is almost perfect. I can play with shadows in very high.

- Convergence fixed. Chiri's convergence unlocker works great with F12011


Issues not fixed:

- Bad depth for environment reflections on the road.

- Little depth problem with shadows. This problem only happens in wet races


Minor issues:

-Some Hud elements have wrong depth. For example other racers name popout a lot and is very annoying. I have disabled this, because this does not affect the gameplay. Perhaps fix this shader is a good start to learn.


Very minor issue:

- Shadows cast wrong over NPC. Only visible this issue in paddock and intro.



I am very happy with this progress :)

I have located some pixel shaders with your pro-tip hunting method. Need some days more to investigate it properly.

Many thanks for your help!

Posted 04/30/2015 12:35 AM   
I think I have a decent fix for Besiege. With DarkStar's help I was able to fix the halo around treess. But that fix caused the shadows to turn mono. I hunted through VS & found the one for shadows (BAEDDED5.txt). Commenting out everything in this removes the shadows. Here is the final result. [IMG]http://i292.photobucket.com/albums/mm23/eroc_remag/Besiege/Besiege01_50_halo_shadows_fixed_zpsrsfvnj5q.jpg[/IMG] Next I'm going to try & fix the shadow. Any tips on how I should approach this?
I think I have a decent fix for Besiege. With DarkStar's help I was able to fix the halo around treess. But that fix caused the shadows to turn mono. I hunted through VS & found the one for shadows (BAEDDED5.txt). Commenting out everything in this removes the shadows. Here is the final result.

Image

Next I'm going to try & fix the shadow. Any tips on how I should approach this?

Posted 05/12/2015 10:31 AM   
[quote="eroc_remag"]I think I have a decent fix for Besiege. With DarkStar's help I was able to fix the halo around treess. But that fix caused the shadows to turn mono. I hunted through VS & found the one for shadows (BAEDDED5.txt). Commenting out everything in this removes the shadows. Here is the final result. [IMG]http://i292.photobucket.com/albums/mm23/eroc_remag/Besiege/Besiege01_50_halo_shadows_fixed_zpsrsfvnj5q.jpg[/IMG] Next I'm going to try & fix the shadow. Any tips on how I should approach this?[/quote] Shadows are 99% of the times fixed in the Pixel Shader rather than Vertex Shader. The good part is that you already have them redering in 2D;) So, what you should do is search for the PS for the shadows and apply the correction inside there;)) Hope it helps;))
eroc_remag said:I think I have a decent fix for Besiege. With DarkStar's help I was able to fix the halo around treess. But that fix caused the shadows to turn mono. I hunted through VS & found the one for shadows (BAEDDED5.txt). Commenting out everything in this removes the shadows. Here is the final result.

Image

Next I'm going to try & fix the shadow. Any tips on how I should approach this?


Shadows are 99% of the times fixed in the Pixel Shader rather than Vertex Shader. The good part is that you already have them redering in 2D;) So, what you should do is search for the PS for the shadows and apply the correction inside there;))
Hope it helps;))

1x Palit RTX 2080Ti Pro Gaming OC(watercooled and overclocked to hell)
3x 3D Vision Ready Asus VG278HE monitors (5760x1080).
Intel i9 9900K (overclocked to 5.3 and watercooled ofc).
Asus Maximus XI Hero Mobo.
16 GB Team Group T-Force Dark Pro DDR4 @ 3600.
Lots of Disks:
- Raid 0 - 256GB Sandisk Extreme SSD.
- Raid 0 - WD Black - 2TB.
- SanDisk SSD PLUS 480 GB.
- Intel 760p 256GB M.2 PCIe NVMe SSD.
Creative Sound Blaster Z.
Windows 10 x64 Pro.
etc


My website with my fixes and OpenGL to 3D Vision wrapper:
http://3dsurroundgaming.com

(If you like some of the stuff that I've done and want to donate something, you can do it with PayPal at tavyhome@gmail.com)

Posted 05/12/2015 11:28 AM   
I've run into a new problem with PS for Besiege. I just have to copy the unmodified PS file into ShaderOverride folder & the shader gets disabled! At first I thought that it could be because of some inputs coming from the VS that I had modified. So I cleared my VertexShaders folder & put just one PS file in PixelShaders folder & still the shader is disabled when I launch the game. Any idea what could be going on here?
I've run into a new problem with PS for Besiege. I just have to copy the unmodified PS file into ShaderOverride folder & the shader gets disabled! At first I thought that it could be because of some inputs coming from the VS that I had modified. So I cleared my VertexShaders folder & put just one PS file in PixelShaders folder & still the shader is disabled when I launch the game.

Any idea what could be going on here?

Posted 05/13/2015 07:32 AM   
[quote="eroc_remag"]I've run into a new problem with PS for Besiege. I just have to copy the unmodified PS file into ShaderOverride folder & the shader gets disabled! At first I thought that it could be because of some inputs coming from the VS that I had modified. So I cleared my VertexShaders folder & put just one PS file in PixelShaders folder & still the shader is disabled when I launch the game. Any idea what could be going on here?[/quote] Doesn't ring a bell to me, but there are occasional times when HelixMod will run off the rails. Check the LOG.txt for any errors or hints as to what is happening. Look specifically for your shader #. The Lua error stuff is normal and a red-herring. If nothing seems promising there, post the PS here and we can maybe see something.
eroc_remag said:I've run into a new problem with PS for Besiege. I just have to copy the unmodified PS file into ShaderOverride folder & the shader gets disabled! At first I thought that it could be because of some inputs coming from the VS that I had modified. So I cleared my VertexShaders folder & put just one PS file in PixelShaders folder & still the shader is disabled when I launch the game.

Any idea what could be going on here?

Doesn't ring a bell to me, but there are occasional times when HelixMod will run off the rails.

Check the LOG.txt for any errors or hints as to what is happening. Look specifically for your shader #. The Lua error stuff is normal and a red-herring.

If nothing seems promising there, post the PS here and we can maybe see something.

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/13/2015 09:48 AM   
Here's the log entry for the PS C24D6005 [code] CreatePixelShader CRC: 0xC24D6005 .\ShaderOverride\PixelShaders\C24D6005.txt.1 pD3DXAssembleShaderFromFile pixel Shader overrode without errors CRC: 0xC24D6005 D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 1080 Width 1920 Usage 1 Format 21 Pool 0 Levels 1 texptr 0 nIndex 0, Mode 0 [/code] And here's the shader code. The only change in this shader is conversion from PS2 to PS3 using DarkStar's script. The rest of the code is untouched. [code] //PS for shadows? ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py dcl_2d s0 dcl_2d s1 def c27, 0, 1, 255, 0.00392156979 dcl_texcoord v0.xy dcl_texcoord1 v1.xyz texld r0, v0, s0 mad r0.x, r0, c20, c20.y rcp r0.x, r0.x mul r2.xyz, r0.x, v1 mov r2.w, c27.y dp4 r3.z, r2, c18 dp4 r3.x, r2, c16 dp4 r3.y, r2, c17 dp4 r3.w, r2, c19 add r1.xyz, r3, -c21 add r5.xyz, r3, -c24 dp3 r1.x, r1, r1 add r4.xyz, r3, -c22 dp3 r1.y, r4, r4 add r4.xyz, r3, -c23 dp3 r1.z, r4, r4 dp3 r1.w, r5, r5 add r1, r1, -c25 cmp r1, r1, c27.x, c27.y mov r4.x, r1.y mov r4.y, r1.z mov r4.z, r1.w add_sat r5.xyz, r4, -r1 dp4 r2.z, r3, c6 dp4 r2.x, r3, c4 dp4 r2.y, r3, c5 mul r4.xyz, r5.x, r2 dp4 r2.z, r3, c2 dp4 r2.y, r3, c1 dp4 r2.x, r3, c0 mad r2.xyz, r1.x, r2, r4 dp4 r1.z, r3, c10 dp4 r1.y, r3, c9 dp4 r1.x, r3, c8 mad r1.xyz, r5.y, r1, r2 dp4 r2.y, r3, c13 dp4 r2.x, r3, c12 dp4 r2.z, r3, c14 mad r1.xyz, r2, r5.z, r1 add r2.x, -r0, c27.y mov r0.x, c26 mul r2.xy, r2.x, c27.yzxw frc r2.xy, r2 add r0.x, c27.y, -r0 mov r0.y, c27 texld r1, r1, s1 mad r0.x, r1, r0, c26 mov r1.y, r2 mad r1.x, -r2.y, c27.w, r2 mov r0.w, r1.y mov r0.z, r1.x mov_pp oC0, r0 // approximately 52 instruction slots used (2 texture, 50 arithmetic) [/code]
Here's the log entry for the PS C24D6005


CreatePixelShader CRC: 0xC24D6005 

.\ShaderOverride\PixelShaders\C24D6005.txt.1

pD3DXAssembleShaderFromFile

pixel Shader overrode without errors CRC: 0xC24D6005

D3DUSAGE_RENDERTARGET/D3DUSAGE_DEPTHSTENCIL Height 1080 Width 1920 Usage 1 Format 21 Pool 0 Levels 1 texptr 0 nIndex 0, Mode 0


And here's the shader code. The only change in this shader is conversion from PS2 to PS3 using DarkStar's script. The rest of the code is untouched.

//PS for shadows?

ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py
dcl_2d s0
dcl_2d s1
def c27, 0, 1, 255, 0.00392156979
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
texld r0, v0, s0
mad r0.x, r0, c20, c20.y
rcp r0.x, r0.x
mul r2.xyz, r0.x, v1
mov r2.w, c27.y
dp4 r3.z, r2, c18
dp4 r3.x, r2, c16
dp4 r3.y, r2, c17
dp4 r3.w, r2, c19
add r1.xyz, r3, -c21
add r5.xyz, r3, -c24
dp3 r1.x, r1, r1
add r4.xyz, r3, -c22
dp3 r1.y, r4, r4
add r4.xyz, r3, -c23
dp3 r1.z, r4, r4
dp3 r1.w, r5, r5
add r1, r1, -c25
cmp r1, r1, c27.x, c27.y
mov r4.x, r1.y
mov r4.y, r1.z
mov r4.z, r1.w
add_sat r5.xyz, r4, -r1
dp4 r2.z, r3, c6
dp4 r2.x, r3, c4
dp4 r2.y, r3, c5
mul r4.xyz, r5.x, r2
dp4 r2.z, r3, c2
dp4 r2.y, r3, c1
dp4 r2.x, r3, c0
mad r2.xyz, r1.x, r2, r4
dp4 r1.z, r3, c10
dp4 r1.y, r3, c9
dp4 r1.x, r3, c8
mad r1.xyz, r5.y, r1, r2
dp4 r2.y, r3, c13
dp4 r2.x, r3, c12
dp4 r2.z, r3, c14
mad r1.xyz, r2, r5.z, r1
add r2.x, -r0, c27.y
mov r0.x, c26
mul r2.xy, r2.x, c27.yzxw
frc r2.xy, r2
add r0.x, c27.y, -r0
mov r0.y, c27
texld r1, r1, s1
mad r0.x, r1, r0, c26
mov r1.y, r2
mad r1.x, -r2.y, c27.w, r2
mov r0.w, r1.y
mov r0.z, r1.x
mov_pp oC0, r0

// approximately 52 instruction slots used (2 texture, 50 arithmetic)

Posted 05/14/2015 03:45 AM   
Did you try copying the actual unmodified Pixel Shader(ps_2_0) into the ShaderOverride or just the converted Pixel Shader? Helix Mod doesn't need it to be converted to ps_3_0 to load it properly in the game, that'd tell you if it's an issue with Helix Mod or the conversion.
Did you try copying the actual unmodified Pixel Shader(ps_2_0) into the ShaderOverride or just the converted Pixel Shader? Helix Mod doesn't need it to be converted to ps_3_0 to load it properly in the game, that'd tell you if it's an issue with Helix Mod or the conversion.
Posted 05/14/2015 04:27 AM   
@TsaebehT - I loaded the converted PS file. AFAIK Helix Mod doesn't load PS_2_0 files. This problem started occurring only y'day. Before that the game did not disable any shaders placed in ShaderOverride folder.
@TsaebehT - I loaded the converted PS file. AFAIK Helix Mod doesn't load PS_2_0 files. This problem started occurring only y'day. Before that the game did not disable any shaders placed in ShaderOverride folder.

Posted 05/14/2015 08:05 AM   
I can assure you it loads ps_2_0 files, I've edited them and loaded them perfectly fine countless times ... it only needs ps_3_0 code to add the stereoscopy we need for the fixes. :)
I can assure you it loads ps_2_0 files, I've edited them and loaded them perfectly fine countless times ... it only needs ps_3_0 code to add the stereoscopy we need for the fixes. :)
Posted 05/14/2015 03:00 PM   
It doesn't occur if I put the files without converting them to ps_3_0. The orange lines are the ones added by DarkStar's script. Anything wrong with them? ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py dcl_2d s0 dcl_2d s1 def c27, 0, 1, 255, 0.00392156979 [color="orange"] dcl_texcoord v0.xy dcl_texcoord1 v1.xyz texld r0, v0, s0[/color] mad r0.x, r0, c20, c20.y rcp r0.x, r0.x [color="orange"] mul r2.xyz, r0.x, v1[/color] This bug has eaten up a lot of my time & I'm unable to make any progress on the fix. EDIT: It only occurs with PS files & not with VS files. EDIT EDIT: I've narrowed down the problem to my DX9Settings.ini file. If I replace mine with Helix's default, the problem doesn't occur. Here's my DX9Settings.ini file. I don't see anything obviously wrong with it though. [code] [General] // UseRenderedShaders=true is nearly always useful, because it trims the // list of shaders seen while hunting down to just those active in the // current scene. Disable this only if you get crashes during hunting. UseRenderedShaders=true // DumpAll will generate ASM text files for every shader seen by the game. // This is usually worth doing once, but not useful for every run. DumpAll=false // Constant registers that will arrive in Vertex and Pixel Shaders, as // c49. You can define any constant register as long as it is not used in any other shader in the game. Check for the desired constant register in the Dumps folder to find out if any other shander uses it. The constants below will be assigned, based on the key preset. In this game only c49 works. Higher values like c220 do not work. DefVSConst1 = 49 DefPSConst1 = 49 //Helix Sampler DefPSSampler = 13 // The PresetKeysList specifies which KEYs will be used. // Multiple keys lists are supported. // Note that the KEY sections are in hexadecimales PresetsKeysList = 1;2; // For this single key example, we only need one keylist, KEY1. This specifies // that the Numpad 0 keyboard key (Key=96) should act as a toggle. And toggle // between the two Presets of PRES1, PRES2. Which will change the Const1 being // passed to the shader code from 1.0 to 0.0 as floating point numbers. // Type=1 is toggle, Type=2 is momentary. The value 96 is in decimal virtual key code. [KEY1] //Numpad 0 Key = 96 Presets = 1;2; Type = 1 // Constants that will be sent to every shader through constant register c190. // The Const1 tells us that we'll need to use c49.x to compare against these // values. Const2 would be seen as c49.y. // 0x3f800000 is 1.0 in floating point hex, 0x00000000 is 0.0 in hex // UseByDef specifies which constant is the default starting value. [PRES1] Const1 = 0x3f800000 UseByDef=True [PRES2] Const1 = 0x00000000 [KEY2] //PG Up key Key = 33 Presets = 3;4; Type = 1 [PRES3] Const2 = 0x3f800000 UseByDef=True [PRES4] Const2 = 0x00000000 [/code]
It doesn't occur if I put the files without converting them to ps_3_0. The orange lines are the ones added by DarkStar's script. Anything wrong with them?


ps_3_0 // Converted from ps_2_0 with DarkStarSword's shadertool.py
dcl_2d s0
dcl_2d s1
def c27, 0, 1, 255, 0.00392156979
dcl_texcoord v0.xy
dcl_texcoord1 v1.xyz
texld r0, v0, s0


mad r0.x, r0, c20, c20.y
rcp r0.x, r0.x
mul r2.xyz, r0.x, v1

This bug has eaten up a lot of my time & I'm unable to make any progress on the fix.

EDIT: It only occurs with PS files & not with VS files.

EDIT EDIT: I've narrowed down the problem to my DX9Settings.ini file. If I replace mine with Helix's default, the problem doesn't occur.

Here's my DX9Settings.ini file. I don't see anything obviously wrong with it though.

[General]

// UseRenderedShaders=true is nearly always useful, because it trims the
// list of shaders seen while hunting down to just those active in the
// current scene. Disable this only if you get crashes during hunting.
UseRenderedShaders=true

// DumpAll will generate ASM text files for every shader seen by the game.
// This is usually worth doing once, but not useful for every run.
DumpAll=false

// Constant registers that will arrive in Vertex and Pixel Shaders, as
// c49. You can define any constant register as long as it is not used in any other shader in the game. Check for the desired constant register in the Dumps folder to find out if any other shander uses it. The constants below will be assigned, based on the key preset. In this game only c49 works. Higher values like c220 do not work.
DefVSConst1 = 49
DefPSConst1 = 49

//Helix Sampler
DefPSSampler = 13

// The PresetKeysList specifies which KEYs will be used.
// Multiple keys lists are supported.
// Note that the KEY sections are in hexadecimales
PresetsKeysList = 1;2;

// For this single key example, we only need one keylist, KEY1. This specifies
// that the Numpad 0 keyboard key (Key=96) should act as a toggle. And toggle
// between the two Presets of PRES1, PRES2. Which will change the Const1 being
// passed to the shader code from 1.0 to 0.0 as floating point numbers.
// Type=1 is toggle, Type=2 is momentary. The value 96 is in decimal virtual key code.
[KEY1]
//Numpad 0
Key = 96
Presets = 1;2;
Type = 1

// Constants that will be sent to every shader through constant register c190.
// The Const1 tells us that we'll need to use c49.x to compare against these
// values. Const2 would be seen as c49.y.
// 0x3f800000 is 1.0 in floating point hex, 0x00000000 is 0.0 in hex
// UseByDef specifies which constant is the default starting value.
[PRES1]
Const1 = 0x3f800000
UseByDef=True
[PRES2]
Const1 = 0x00000000


[KEY2]
//PG Up key
Key = 33
Presets = 3;4;
Type = 1

[PRES3]
Const2 = 0x3f800000
UseByDef=True
[PRES4]
Const2 = 0x00000000

Posted 05/15/2015 07:25 AM   
That ini file looks fine to me... Best guess is that one of the settings is somehow causing an issue in an unrelated shader (though I'm not sure why that would only happen when you override this shader, but I've seen enough weirdness with Helix mod that I wouldn't put it past it). Try commenting out the DefPSConst1 and DefVSConst1 lines to see if they are the culprit, then maybe try changing DefPSSampler to another register (like 15).
That ini file looks fine to me...

Best guess is that one of the settings is somehow causing an issue in an unrelated shader (though I'm not sure why that would only happen when you override this shader, but I've seen enough weirdness with Helix mod that I wouldn't put it past it).

Try commenting out the DefPSConst1 and DefVSConst1 lines to see if they are the culprit, then maybe try changing DefPSSampler to another register (like 15).

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 05/15/2015 09:29 AM   
  34 / 87    
Scroll To Top