ELEX - 3D Vision Fix
  7 / 9    
No, this is crashing after some seconds.
No, this is crashing after some seconds.

#91
Posted 01/11/2018 01:00 PM   
@skr68, what resolution are you using?? i want to tweak the ShaderRegex without "x1 = res_width"
@skr68, what resolution are you using?? i want to tweak the ShaderRegex without "x1 = res_width"

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#92
Posted 01/11/2018 01:24 PM   
1920x1080
1920x1080

#93
Posted 01/11/2018 02:46 PM   
try this one: [code][ShaderRegexDecalPS] shader_model = ps_5_0 temps = stereo tmp1 tmp2 temp3 ps-cb3 = ResourceCommonMatrices post ps-cb3 = null [ShaderRegexDecalPS.Pattern] (?s) (?P<part1> ld_indexable\(texture2d\)\(float,float,float,float\)\s (?P<reg_depth>r\d+)\.(?P<reg_depth_sw>[xyzw]), r\d+\.[xyzw]{4}, t0\.[xyzw]{4}\n imul null, r\d+\.[xyzw], v1\.x, l\(10\)\n div r\d+\.z, l\(1\.000000, 1\.000000, 1\.000000, 1\.000000\), r\d+\.[xyzw]\n mov (?<reg_pos>r\d+)\.xy, v2\.xyxx\n mov r\d+\.w, l\(1\.000000\)\n ) (?P<part2> dp4 r\d+\.x, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?4\]\.xyzw\n dp4 r\d+\.y, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?5\]\.xyzw\n dp4 r\d+\.z, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?6\]\.xyzw\n dp4 r\d+\.[xyzw], r\d+\.xyzw, cb1\[r1\.y\s?\+\s?7\]\.xyzw\n .*? discard_nz r\d+\.[xyzw]\n ) (?P<part3> .*? dp4 r\d+\.x, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?4\]\.xyzw\n dp4 r\d+\.y, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?5\]\.xyzw\n dp4 r\d+\.[xyzw], r\d+\.xyzw, cb1\[r1\.y\s?\+\s?7\]\.xyzw\n div r\d+\.[xyzw]{2}, r\d+\.[xyzw]{4}, r\d+\.[xyzw]{4}\n add r\d+\.[xyzw]{2,4}, -r\d+\.[xyzw]{4}, r\d+\.[xyzw]{4}\n ) [ShaderRegexDecalPS.Pattern.Replace] ${part1}\n ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n ; Fix clipping, save unfixed r2 for use later ; pos.x -= stereo.x * (1 - stereo.y / m_fFar / depth) * res_x/2; mov ${tmp1}.xyzw, ${reg_pos}.xyzw\n div ${stereo}.w, ${stereo}.y, cb3[34].w\n div ${stereo}.w, ${stereo}.w, ${reg_depth}.${reg_depth_sw}\n add ${stereo}.w, l(1.0), -${stereo}.w\n mul ${stereo}.w, ${stereo}.w, ${stereo}.x\n mul ${stereo}.w, ${stereo}.w, l(1920.000000)\n mul ${stereo}.w, ${stereo}.w, l(0.500000)\n add ${reg_pos}.x, ${reg_pos}.x, -${stereo}.w\n \n${part2}\n ; Calculate transformed unfixed r2. dp4 ${tmp2}.x, ${tmp1}.xyzw, cb1[r1.y+4].xyzw\n dp4 ${tmp2}.y, ${tmp1}.xyzw, cb1[r1.y+5].xyzw\n dp4 ${tmp2}.z, ${tmp1}.xyzw, cb1[r1.y+6].xyzw\n dp4 ${tmp2}.w, ${tmp1}.xyzw, cb1[r1.y+7].xyzw\n div ${tmp2}.xyzw, ${tmp2}.xyzw, ${tmp2}.wwww\n ; Fixed transformed r2 is required later to fix texcoord. mov ${tmp1}.xyzw, ${reg_pos}.xyzw\n ; Unfix transformed r2 to avoid texture blur in code below. mov ${reg_pos}.xyz, ${tmp2}.xyz\n \n${part3}\n ; Adjust texcoord mov ${reg_pos}.xy, ${tmp1}.xy\n\n [ShaderRegexDecalPS.InsertDeclarations] dcl_constantbuffer cb3[47], immediateIndexed dcl_resource_texture2d (float,float,float,float) t125[/code] If still crash....there something bad with the cb3 and the Resource used for that. The first recommendation for mx-2 is to use cb13 to be sure cb is not already used by the game.
try this one:

[ShaderRegexDecalPS]
shader_model = ps_5_0
temps = stereo tmp1 tmp2 temp3
ps-cb3 = ResourceCommonMatrices
post ps-cb3 = null

[ShaderRegexDecalPS.Pattern]
(?s)
(?P<part1>
ld_indexable\(texture2d\)\(float,float,float,float\)\s
(?P<reg_depth>r\d+)\.(?P<reg_depth_sw>[xyzw]), r\d+\.[xyzw]{4}, t0\.[xyzw]{4}\n
imul null, r\d+\.[xyzw], v1\.x, l\(10\)\n
div r\d+\.z, l\(1\.000000, 1\.000000, 1\.000000, 1\.000000\), r\d+\.[xyzw]\n
mov (?<reg_pos>r\d+)\.xy, v2\.xyxx\n
mov r\d+\.w, l\(1\.000000\)\n
)
(?P<part2>
dp4 r\d+\.x, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?4\]\.xyzw\n
dp4 r\d+\.y, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?5\]\.xyzw\n
dp4 r\d+\.z, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?6\]\.xyzw\n
dp4 r\d+\.[xyzw], r\d+\.xyzw, cb1\[r1\.y\s?\+\s?7\]\.xyzw\n
.*?
discard_nz r\d+\.[xyzw]\n
)
(?P<part3>
.*?
dp4 r\d+\.x, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?4\]\.xyzw\n
dp4 r\d+\.y, r\d+\.xyzw, cb1\[r1\.y\s?\+\s?5\]\.xyzw\n
dp4 r\d+\.[xyzw], r\d+\.xyzw, cb1\[r1\.y\s?\+\s?7\]\.xyzw\n
div r\d+\.[xyzw]{2}, r\d+\.[xyzw]{4}, r\d+\.[xyzw]{4}\n
add r\d+\.[xyzw]{2,4}, -r\d+\.[xyzw]{4}, r\d+\.[xyzw]{4}\n
)

[ShaderRegexDecalPS.Pattern.Replace]
${part1}\n
ld_indexable(texture2d)(float,float,float,float) ${stereo}.xyzw, l(0, 0, 0, 0), t125.xyzw\n
; Fix clipping, save unfixed r2 for use later
; pos.x -= stereo.x * (1 - stereo.y / m_fFar / depth) * res_x/2;
mov ${tmp1}.xyzw, ${reg_pos}.xyzw\n
div ${stereo}.w, ${stereo}.y, cb3[34].w\n
div ${stereo}.w, ${stereo}.w, ${reg_depth}.${reg_depth_sw}\n
add ${stereo}.w, l(1.0), -${stereo}.w\n
mul ${stereo}.w, ${stereo}.w, ${stereo}.x\n
mul ${stereo}.w, ${stereo}.w, l(1920.000000)\n
mul ${stereo}.w, ${stereo}.w, l(0.500000)\n
add ${reg_pos}.x, ${reg_pos}.x, -${stereo}.w\n
\n${part2}\n
; Calculate transformed unfixed r2.
dp4 ${tmp2}.x, ${tmp1}.xyzw, cb1[r1.y+4].xyzw\n
dp4 ${tmp2}.y, ${tmp1}.xyzw, cb1[r1.y+5].xyzw\n
dp4 ${tmp2}.z, ${tmp1}.xyzw, cb1[r1.y+6].xyzw\n
dp4 ${tmp2}.w, ${tmp1}.xyzw, cb1[r1.y+7].xyzw\n
div ${tmp2}.xyzw, ${tmp2}.xyzw, ${tmp2}.wwww\n
; Fixed transformed r2 is required later to fix texcoord.
mov ${tmp1}.xyzw, ${reg_pos}.xyzw\n
; Unfix transformed r2 to avoid texture blur in code below.
mov ${reg_pos}.xyz, ${tmp2}.xyz\n
\n${part3}\n
; Adjust texcoord
mov ${reg_pos}.xy, ${tmp1}.xy\n\n

[ShaderRegexDecalPS.InsertDeclarations]
dcl_constantbuffer cb3[47], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t125



If still crash....there something bad with the cb3 and the Resource used for that.

The first recommendation for mx-2 is to use cb13 to be sure cb is not already used by the game.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#94
Posted 01/11/2018 03:12 PM   
Still crash :(
Still crash :(

#95
Posted 01/11/2018 03:45 PM   
Good work skr68 and DHR norrowing down the issue. I had never thought that the crashes are caused by some pixel shaders. With the new patch the game already binds the common matrix resource to cb0 even though it is not used in the shader code. It looks like the "copy to cb3" 3dmigoto command then messed up something which causes the game to crash. I uploaded a new [url=https://raw.githubusercontent.com/mx-2/3d-fix/98c5e5c21cd9dbd57111a0991a48def1f998528d/ELEX/d3dx.ini]d3dx.ini[/url] which hopefully fixes the crash. Please check if it works now.
Good work skr68 and DHR norrowing down the issue. I had never thought that the crashes are caused by some pixel shaders.

With the new patch the game already binds the common matrix resource to cb0 even though it is not used in the shader code. It looks like the "copy to cb3" 3dmigoto command then messed up something which causes the game to crash.

I uploaded a new d3dx.ini which hopefully fixes the crash. Please check if it works now.
Yeah, that seems to work, at least longer than a few seconds, and looks great! Will test for the rest of the afternoon now :)
Yeah, that seems to work, at least longer than a few seconds, and looks great!

Will test for the rest of the afternoon now :)

#97
Posted 01/11/2018 04:31 PM   
@mx-2 Probably the cb3 was already used by one or more decals shader, but not declared...so that lead to a crash when a PS for decals was loaded. i recommend, if possible, you do the same in the ini for [ShaderRegexShadowPS]...you use cb1 to copy the resource and those low cb# are always used!, [b]so this also may cause a crash eventually[/b]. If the matrices are not in the same shader, i recommend you to use cb13 instead cb1. *EDIT: Try to upload your fixes in the helixmod blog :) good fixes need to be in one know place.
@mx-2
Probably the cb3 was already used by one or more decals shader, but not declared...so that lead to a crash when a PS for decals was loaded.

i recommend, if possible, you do the same in the ini for [ShaderRegexShadowPS]...you use cb1 to copy the resource and those low cb# are always used!, so this also may cause a crash eventually. If the matrices are not in the same shader, i recommend you to use cb13 instead cb1.


*EDIT: Try to upload your fixes in the helixmod blog :) good fixes need to be in one know place.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#98
Posted 01/11/2018 04:44 PM   
After two hours of crash free game play in perfect 3D, I must say: Wow, great job!
After two hours of crash free game play in perfect 3D, I must say: Wow, great job!

#99
Posted 01/11/2018 06:24 PM   
decals still appear at wrong depth but I honestly couldnt care less. thank you all again!
decals still appear at wrong depth but I honestly couldnt care less. thank you all again!

Posted 01/11/2018 10:39 PM   
I uploaded version 1.5 of the fix which should finally fix the crash issues. Big thanks to DHR and skr68 for tracking down the issue, without your help this crashes would never have been fixed.
I uploaded version 1.5 of the fix which should finally fix the crash issues.

Big thanks to DHR and skr68 for tracking down the issue, without your help this crashes would never have been fixed.
Thank you very much fo this fix. I have a problem with the auto crosshait, it doesnt work for me?? Its still at very high depth and does not change with the zbuffer.
Thank you very much fo this fix. I have a problem with the auto crosshait, it doesnt work for me?? Its still at very high depth and does not change with the zbuffer.

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 01/14/2018 10:48 AM   
Thank You mx-2 for the fix. All is working great under windows 10. (Without crashes)
Thank You mx-2 for the fix. All is working great under windows 10. (Without crashes)

CPU: Intel Core i7 7700K
Motherboard: ASUS ROG Maximus IX Hero
RAM: G.Skill Trident Z 16GB 3866MHz
GPU: ASUS GTX 980 Ti STRIX
Monitor: ASUS VG248QE
Headset: G930 7.1 Wireless

Posted 01/14/2018 11:12 AM   
I can confirm that this fix runs very well under Windows 10. Thank you for all the effort yout put into this fix!
I can confirm that this fix runs very well under Windows 10.

Thank you for all the effort yout put into this fix!

ASUS ROG Strix GeForce GTX 1080 | Core I7-7700K | 16GB RAM | Win10 Pro x64
Asus ROG Swift PG278Q 3D Vision Monitor
Optoma UHD 40 3D Vision Projector
Paypal donations for 3D Fix Manager: duselpaul86@gmx.de

Posted 01/21/2018 02:41 PM   
[quote="Pauldusler"]I can confirm that this fix runs very well under Windows 10. Thank you for all the effort yout put into this fix![/quote] Dito
Pauldusler said:I can confirm that this fix runs very well under Windows 10.

Thank you for all the effort yout put into this fix!


Dito

Like my work? Donations can be made via PayPal to: rauti@inetmx.de

Posted 01/21/2018 03:19 PM   
  7 / 9    
Scroll To Top