[quote="masterotaku"]Can you put all that shader code in a code block? Also, show me the ASM code too, to see the full shader.
It looks similar to shadows in Resident Evil 7, but I want to be sure after looking at the ASM code.[/quote]
THX for your effort. Hopefully you can see the trick ^^ My search was not find any match with a fixed shader of my data base (also including RE7 wip from you)
But hey....its a hot summer...:-)
Will be back on this project tomorrow evening after my day job.....my wife is crying after me once more telling me to make the dinner ready ^^
masterotaku said:Can you put all that shader code in a code block? Also, show me the ASM code too, to see the full shader.
It looks similar to shadows in Resident Evil 7, but I want to be sure after looking at the ASM code.
THX for your effort. Hopefully you can see the trick ^^ My search was not find any match with a fixed shader of my data base (also including RE7 wip from you)
But hey....its a hot summer...:-)
Will be back on this project tomorrow evening after my day job.....my wife is crying after me once more telling me to make the dinner ready ^^
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
@Losti
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!!
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!!
[quote="DHR"]@Losti
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!![/quote]
YEAH and this is what i have done using the MEA fixing formula for "this game" because it looks similar but....seems i did some stupid error because it was not working ^^
OK THX for your help. I will try to write the regex by my own to learn it....i know this is only a synthax thing and i did it before but the problem from me is, i will forgott about it if i dont repeat it several times, hence ill try to keep my lastest knowledge freshed up and try to write the regex. But ill contact you in any case of problems....ill have to chekc if there are more shaders that are exately like this or little different to create a regex that will match all of them....ill be sure ill can make it :-)
The shadow shader is the major problem in this case :-(
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!!
YEAH and this is what i have done using the MEA fixing formula for "this game" because it looks similar but....seems i did some stupid error because it was not working ^^
OK THX for your help. I will try to write the regex by my own to learn it....i know this is only a synthax thing and i did it before but the problem from me is, i will forgott about it if i dont repeat it several times, hence ill try to keep my lastest knowledge freshed up and try to write the regex. But ill contact you in any case of problems....ill have to chekc if there are more shaders that are exately like this or little different to create a regex that will match all of them....ill be sure ill can make it :-)
The shadow shader is the major problem in this case :-(
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
I'm pasting here a PM I sent DJ-RK a while ago about the VXAO and ShadowLibs fixes in FFXV. The VXAO fix is the same formula as the RE7 shadows/decals fix. "r16" is the stereo params. Constant buffers (cb?[?]) and registers (r?) will be different:
[quote="masterotaku"]First of all, it's how I found out the fix for shadows and decals in Resident Evil 7. By trial and error as always :p.
It's "cd614b3e1fd5ec24-ps.txt" but you surely know it because you dumped it first.
The important part is here:
[code]mul r4.xyzw, r0.wwww, cb2[5].xyzw
mad r4.xyzw, r0.xxxx, cb2[4].xyzw, r4.xyzw
mad r4.xyzw, r2.xxxx, cb2[6].xyzw, r4.xyzw
add r4.xyzw, r4.xyzw, cb2[7].xyzw[/code]
That r0.x needs to be corrected. But to make it correct in 3D, you need the final result of r4.w. So at line 261 I did this (copying some lines from above and below for reference):
[code]mul r0.xw, r0.xxxw, cb2[17].xxxy
mad r0.x, r0.x, l(2.000000), l(-1.000000)
mad r0.w, -r0.w, l(2.000000), l(1.000000)
//Saving future results of r4 in r17.
mul r17.xyzw, r0.wwww, cb2[5].xyzw
mad r17.xyzw, r0.xxxx, cb2[4].xyzw, r17.xyzw
mad r17.xyzw, r2.xxxx, cb2[6].xyzw, r17.xyzw
add r17.xyzw, r17.xyzw, cb2[7].xyzw
//First r0.x to full depth, and then corrected with r17.w.
add r0.x, -r16.x, r0.x
mul r16.w, r16.x, r16.y
mad r0.x, r16.w, r17.w, r0.x
mul r4.xyzw, r0.wwww, cb2[5].xyzw
mad r4.xyzw, r0.xxxx, cb2[4].xyzw, r4.xyzw
mad r4.xyzw, r2.xxxx, cb2[6].xyzw, r4.xyzw
add r4.xyzw, r4.xyzw, cb2[7].xyzw
div r3.yzw, r4.xxyz, r4.wwww
add r3.yzw, r3.yyzw, cb2[12].xxyz
add r4.xyz, r3.yzwy, -cb0[2].xyzx
max r0.x, |r4.z|, |r4.y|[/code]
That's all. I put "r0.x" to full depth first, and then I pull it back with a multiplication of separation, convergence, and "r17.w".
For ShadowLibs (847f6eaa3e0ba249-ps.txt and f46d0ae234f6b320-ps.txt, although this second one didn't seem to have any effect but it had the same lines of code basically, so why not leave it fixed there :p) it was a bit different. I didn't have to preapply full depth, and the correction is negative (ignore the commented lines):
[code]
movc r4.z, r0.w, r2.x, r3.x
mad r4.x, r6.x, l(2.000000), l(-1.000000)
mad r4.y, r6.y, l(-2.000000), l(1.000000)
dp4 r12.x, r4.xyzw, cb13[36].xyzw
dp4 r12.y, r4.xyzw, cb13[37].xyzw
dp4 r12.z, r4.xyzw, cb13[38].xyzw
dp4 r12.w, r4.xyzw, cb13[39].xyzw
//add r1.x, -r25.x, r1.x
//mul r26.w, r25.x, r25.y
//mad r1.x, r26.w, r12.w, r1.x
mad r25.w, r12.w, r25.y, -l(1.000000)
mad r4.x, r25.x, r25.w, r4.x
dp4 r6.x, r4.xyzw, cb13[36].xyzw
dp4 r6.y, r4.xyzw, cb13[37].xyzw
dp4 r6.z, r4.xyzw, cb13[38].xyzw
dp4 r6.w, r4.xyzw, cb13[39].xyzw
div r6.xyzw, r6.xyzw, r6.wwww
mad r2.x, r6.z, r0.y, l(1.000000)
mul r2.y, r2.x, r2.x[/code]
I discovered it by trial and error. How typical of me. It looks like this effect replaces normal character shadows, being more accurate in theory.
Remember to use VXAO alone, without any other kind of ambient occlusion. It's the only one that is completely correct in 3D with the fix we have.
I tried to get the worst performance I could by enabling all effects (without extra AO) and it was terrible at 1440p, haha. Like 16fps in 3D in a city. LOD distance is the most CPU demanding setting in my experience. By a lot.
Apart from these two effects, other things I did were making pixel shader exceptions to fix some sword and bonfire effects. They shared VS with some skills menu shaders.[/quote]
I'm pasting here a PM I sent DJ-RK a while ago about the VXAO and ShadowLibs fixes in FFXV. The VXAO fix is the same formula as the RE7 shadows/decals fix. "r16" is the stereo params. Constant buffers (cb?[?]) and registers (r?) will be different:
masterotaku said:First of all, it's how I found out the fix for shadows and decals in Resident Evil 7. By trial and error as always :p.
It's "cd614b3e1fd5ec24-ps.txt" but you surely know it because you dumped it first.
That r0.x needs to be corrected. But to make it correct in 3D, you need the final result of r4.w. So at line 261 I did this (copying some lines from above and below for reference):
That's all. I put "r0.x" to full depth first, and then I pull it back with a multiplication of separation, convergence, and "r17.w".
For ShadowLibs (847f6eaa3e0ba249-ps.txt and f46d0ae234f6b320-ps.txt, although this second one didn't seem to have any effect but it had the same lines of code basically, so why not leave it fixed there :p) it was a bit different. I didn't have to preapply full depth, and the correction is negative (ignore the commented lines):
I discovered it by trial and error. How typical of me. It looks like this effect replaces normal character shadows, being more accurate in theory.
Remember to use VXAO alone, without any other kind of ambient occlusion. It's the only one that is completely correct in 3D with the fix we have.
I tried to get the worst performance I could by enabling all effects (without extra AO) and it was terrible at 1440p, haha. Like 16fps in 3D in a city. LOD distance is the most CPU demanding setting in my experience. By a lot.
Apart from these two effects, other things I did were making pixel shader exceptions to fix some sword and bonfire effects. They shared VS with some skills menu shaders.
[quote="Losti"][quote="DHR"]@Losti
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!![/quote]YEAH and this is what i have done using the MEA fixing formula for "this game" because it looks similar but....seems i did some stupid error because it was not working ^^
OK THX for your help. I will try to write the regex by my own to learn it....i know this is only a synthax thing and i did it before but the problem from me is, i will forgott about it if i dont repeat it several times, hence ill try to keep my lastest knowledge freshed up and try to write the regex. But ill contact you in any case of problems....ill have to chekc if there are more shaders that are exately like this or little different to create a regex that will match all of them....ill be sure ill can make it :-)
The shadow shader is the major problem in this case :-([/quote]
For doing regex experiments, and getting working syntax, the best tool to use is https://regex101.com/ where you can paste in the original shader, your regex, then see the output directly. This gives you an immediate trial and error and feedback. Far superior to doing it in game.
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!!
YEAH and this is what i have done using the MEA fixing formula for "this game" because it looks similar but....seems i did some stupid error because it was not working ^^
OK THX for your help. I will try to write the regex by my own to learn it....i know this is only a synthax thing and i did it before but the problem from me is, i will forgott about it if i dont repeat it several times, hence ill try to keep my lastest knowledge freshed up and try to write the regex. But ill contact you in any case of problems....ill have to chekc if there are more shaders that are exately like this or little different to create a regex that will match all of them....ill be sure ill can make it :-)
The shadow shader is the major problem in this case :-(
For doing regex experiments, and getting working syntax, the best tool to use is https://regex101.com/ where you can paste in the original shader, your regex, then see the output directly. This gives you an immediate trial and error and feedback. Far superior to doing it in game.
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
[quote="bo3b"]
For doing regex experiments, and getting working syntax, the best tool to use is https://regex101.com/ where you can paste in the original shader, your regex, then see the output directly. This gives you an immediate trial and error and feedback. Far superior to doing it in game.[/quote]
THX THX THX BO3B this is what I was looking for !!!!
bo3b said:
For doing regex experiments, and getting working syntax, the best tool to use is https://regex101.com/ where you can paste in the original shader, your regex, then see the output directly. This gives you an immediate trial and error and feedback. Far superior to doing it in game.
THX THX THX BO3B this is what I was looking for !!!!
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
[quote="masterotaku"]I'm pasting here a PM I sent DJ-RK a while ago about the VXAO and ShadowLibs fixes in FFXV. The VXAO fix is the same formula as the RE7 shadows/decals fix. "r16" is the stereo params. Constant buffers (cb?[?]) and registers (r?) will be different:
[quote="masterotaku"]First of all, it's how I found out the fix for shadows and decals in Resident Evil 7. By trial and error as always :p.
It's "cd614b3e1fd5ec24-ps.txt" but you surely know it because you dumped it first.
The important part is here:
[code]mul r4.xyzw, r0.wwww, cb2[5].xyzw
mad r4.xyzw, r0.xxxx, cb2[4].xyzw, r4.xyzw
mad r4.xyzw, r2.xxxx, cb2[6].xyzw, r4.xyzw
add r4.xyzw, r4.xyzw, cb2[7].xyzw[/code]
That r0.x needs to be corrected. But to make it correct in 3D, you need the final result of r4.w. So at line 261 I did this (copying some lines from above and below for reference):
[code]mul r0.xw, r0.xxxw, cb2[17].xxxy
mad r0.x, r0.x, l(2.000000), l(-1.000000)
mad r0.w, -r0.w, l(2.000000), l(1.000000)
//Saving future results of r4 in r17.
mul r17.xyzw, r0.wwww, cb2[5].xyzw
mad r17.xyzw, r0.xxxx, cb2[4].xyzw, r17.xyzw
mad r17.xyzw, r2.xxxx, cb2[6].xyzw, r17.xyzw
add r17.xyzw, r17.xyzw, cb2[7].xyzw
//First r0.x to full depth, and then corrected with r17.w.
add r0.x, -r16.x, r0.x
mul r16.w, r16.x, r16.y
mad r0.x, r16.w, r17.w, r0.x
mul r4.xyzw, r0.wwww, cb2[5].xyzw
mad r4.xyzw, r0.xxxx, cb2[4].xyzw, r4.xyzw
mad r4.xyzw, r2.xxxx, cb2[6].xyzw, r4.xyzw
add r4.xyzw, r4.xyzw, cb2[7].xyzw
div r3.yzw, r4.xxyz, r4.wwww
add r3.yzw, r3.yyzw, cb2[12].xxyz
add r4.xyz, r3.yzwy, -cb0[2].xyzx
max r0.x, |r4.z|, |r4.y|[/code]
That's all. I put "r0.x" to full depth first, and then I pull it back with a multiplication of separation, convergence, and "r17.w".
[/quote][/quote]
OK i have tryed to apply this fix to th shader but wohout luck. which position do you mean? I noticed, as often, that only the "first part" if the game is responsible.... but no luck here.
[code]
mul r5.xyzw, r0.zzzz, cb0[r4.z + 36].xyzw
mad r5.xyzw, r0.yyyy, cb0[r4.z + 35].xyzw, r5.xyzw
mad r5.xyzw, r0.xxxx, cb0[r4.z + 37].xyzw, r5.xyzw
add r5.xyzw, r5.xywz, cb0[r4.z + 38].xywz
[/code]
masterotaku said:I'm pasting here a PM I sent DJ-RK a while ago about the VXAO and ShadowLibs fixes in FFXV. The VXAO fix is the same formula as the RE7 shadows/decals fix. "r16" is the stereo params. Constant buffers (cb?[?]) and registers (r?) will be different:
masterotaku said:First of all, it's how I found out the fix for shadows and decals in Resident Evil 7. By trial and error as always :p.
It's "cd614b3e1fd5ec24-ps.txt" but you surely know it because you dumped it first.
That r0.x needs to be corrected. But to make it correct in 3D, you need the final result of r4.w. So at line 261 I did this (copying some lines from above and below for reference):
That's all. I put "r0.x" to full depth first, and then I pull it back with a multiplication of separation, convergence, and "r17.w".
OK i have tryed to apply this fix to th shader but wohout luck. which position do you mean? I noticed, as often, that only the "first part" if the game is responsible.... but no luck here.
There is a basic understanding problem for me....I think....
if i apply
mul o0.x, o0.x, l(1.0)
i thourgth nothing will be changed because mul by 1 = the original value?
Multyiplying by 1 you should get the same as not doing anything. BUT, in ASM you can't read an output register. I'm not sure if you'll get a silent or explicit error, or just a graphics bug / unexpected result. If you have to modify o0, copy what it would get to another temporary register, and then just do a "mov o0.xyzw, r8.xyzw" (r8 or whatever you can use that is free).
Multyiplying by 1 you should get the same as not doing anything. BUT, in ASM you can't read an output register. I'm not sure if you'll get a silent or explicit error, or just a graphics bug / unexpected result. If you have to modify o0, copy what it would get to another temporary register, and then just do a "mov o0.xyzw, r8.xyzw" (r8 or whatever you can use that is free).
[quote="masterotaku"]Multyiplying by 1 you should get the same as not doing anything. BUT, in ASM you can't read an output register. I'm not sure if you'll get a silent or explicit error, or just a graphics bug / unexpected result. If you have to modify o0, copy what it would get to another temporary register, and then just do a "mov o0.xyzw, r8.xyzw" (r8 or whatever you can use that is free).[/quote]
This is correct. You cannot read an output register, nor write an input register. It silently fails, just does nothing.
Carefully review the list of gotchas, these are super annoying:
[url]http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Gotchas[/url]
masterotaku said:Multyiplying by 1 you should get the same as not doing anything. BUT, in ASM you can't read an output register. I'm not sure if you'll get a silent or explicit error, or just a graphics bug / unexpected result. If you have to modify o0, copy what it would get to another temporary register, and then just do a "mov o0.xyzw, r8.xyzw" (r8 or whatever you can use that is free).
This is correct. You cannot read an output register, nor write an input register. It silently fails, just does nothing.
Thx you shader hacking pros !!!
This will explain why my applying fix is not working ... the mul by one was only a test ^^
//EDITH:
.... hm .... also this is not working, the effect is disabled:
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
[quote="Losti"]Thx you shader hacking pros !!!
This will explain why my applying fix is not working ... the mul by one was only a test ^^
//EDITH:
.... hm .... also this is not working, the effect is disabled:
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw[/quote]
Interesting more detail there. Seems like in that case at least, that it clearly reads a 0 from the o0 register. So it's not exactly nothing, but for that instruction it's not clear what to expect. What is in r50 before this instruction?
We do know that it does not crash the shader or do anything similarly bad, so this is consistent with reading outputs being unusable.
This will explain why my applying fix is not working ... the mul by one was only a test ^^
//EDITH:
.... hm .... also this is not working, the effect is disabled:
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
Interesting more detail there. Seems like in that case at least, that it clearly reads a 0 from the o0 register. So it's not exactly nothing, but for that instruction it's not clear what to expect. What is in r50 before this instruction?
We do know that it does not crash the shader or do anything similarly bad, so this is consistent with reading outputs being unusable.
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
This will explain why my applying fix is not working ... the mul by one was only a test ^^
//EDITH:
.... hm .... also this is not working, the effect is disabled:
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
Interesting more detail there. Seems like in that case at least, that it clearly reads a 0 from the o0 register. So it's not exactly nothing, but for that instruction it's not clear what to expect. What is in r50 before this instruction?
We do know that it does not crash the shader or do anything similarly bad, so this is consistent with reading outputs being unusable.
This is the shader
//HUD Icons
// ---- Created with 3Dmigoto v1.3.11 on Mon Aug 06 17:59:58 2018
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION 0 xyz 0 NONE float xyz
// NORMAL 0 xyz 1 NONE float xyz
// COLOR 0 xyzw 2 NONE float
// TEXCOORD 0 xy 3 NONE float xy
// SV_VertexID 0 x 4 VERTID uint
// SV_InstanceID 0 x 5 INSTID uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float xyzw
// TEXCOORD 0 xyzw 1 NONE float xyzw
// TEXCOORD 1 xyzw 2 NONE float xyzw
// TEXCOORD 2 xyzw 3 NONE float xyzw
// TEXCOORD 3 xyzw 4 NONE float xyzw
// TEXCOORD 4 xyzw 5 NONE float xyzw
// InstanceID 0 x 6 NONE uint x
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[23], immediateIndexed
dcl_constantbuffer cb9[1], immediateIndexed
dcl_resource_buffer (float,float,float,float) t19
dcl_resource_structured t53, 4
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v3.xy
dcl_input_sgv v5.x, instance_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.x
I was able to adjust the outpud depth with r9 but it is scaling with the convergence. THourght i cann divide the convergence by it selve to produce 1 as result and mutiply with a constant but failed....
The r50 is not ised in the shader, i also have tryed other registers like r20, same result.
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
I have an answer to that, but I'm on my phone and going to bed so I won't post the full shader code.
Question: is that HUD shader affected by convergence if you don't modify the shader? If the answer is yes:
To sum up, instead of saving all those o0.x, o0.y, o0.z and o0.w individually, save them to r24 for example. Then use that complete r24 to unstereoize it, and then apply your modified depth.
[code]
add r27.w, r24.w, -r27.y
mad r24.x, r27.x, -r27.w, r24.x
//If 25.x is a depth multiplier.
mad r24.x, r27.x, r25.x, r24.x
mov o0.xyzw, r24.xyzw
[/code]
I have an answer to that, but I'm on my phone and going to bed so I won't post the full shader code.
Question: is that HUD shader affected by convergence if you don't modify the shader? If the answer is yes:
To sum up, instead of saving all those o0.x, o0.y, o0.z and o0.w individually, save them to r24 for example. Then use that complete r24 to unstereoize it, and then apply your modified depth.
[quote="masterotaku"]I have an answer to that, but I'm on my phone and going to bed so I won't post the full shader code.
Question: is that HUD shader affected by convergence if you don't modify the shader? If the answer is yes:
To sum up, instead of saving all those o0.x, o0.y, o0.z and o0.w individually, save them to r24 for example. Then use that complete r24 to unstereoize it, and then apply your modified depth.
[code]
add r27.w, r24.w, -r27.y
mad r24.x, r27.x, -r27.w, r24.x
//If 25.x is a depth multiplier.
mad r24.x, r27.x, r25.x, r24.x
mov o0.xyzw, r24.xyzw
[/code]
[/quote]
Yes the HUD is afflicted by convergence. I have to think about it tomorrow or some what....stressfull day...applying the lines you have posted will reult in disable the shader....but you wrote its not the full code...
How can i save o0 ?? i thought this is not readable? I also do not understand the lines i think....
(i think there is a basic misunderstanding by my own....??)
add r27.w, r24.w, -r27.y ==> You add negative convergence to r24.w and save it in r27.w....r24.w is empty, hence r27.w carrys the negative convergence value???
mad r24.x, r27.x, -r27.w, r24.x ==> You multiplay separation and negative convergence (in case i am right with my first interpretation/understanding) and add r24.x => that is empty and save it to r24.x??
HLSL: (r24.x += r27.x*(-r27.y)+0
mad r24.x, r27.x, r25.x, r24.x ==> You multiply the separation with the depth multiplyer and add the multiplication of the negative convergence (in case i am right with my first interpretation)
HLSL: (r24.x += r27.x*iniparams.x+(r27.x*(-r27.y)+0)
what???
//anyway in my understanding removing stereorization in HLSL is o0.xyzw -= separation*convergence
==>
mul r27.w, r27.x, -r27.y
mul r24.xyzw, o0.xyzw, r27.w
mov o0.xyzw, r24.xyzw
//anyway nothing is working ^^
Where is my understanding fault :-(
// Independend from all this,
why is
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
not working? this should do nothing but disables the shader...hä?
masterotaku said:I have an answer to that, but I'm on my phone and going to bed so I won't post the full shader code.
Question: is that HUD shader affected by convergence if you don't modify the shader? If the answer is yes:
To sum up, instead of saving all those o0.x, o0.y, o0.z and o0.w individually, save them to r24 for example. Then use that complete r24 to unstereoize it, and then apply your modified depth.
Yes the HUD is afflicted by convergence. I have to think about it tomorrow or some what....stressfull day...applying the lines you have posted will reult in disable the shader....but you wrote its not the full code...
How can i save o0 ?? i thought this is not readable? I also do not understand the lines i think....
(i think there is a basic misunderstanding by my own....??)
add r27.w, r24.w, -r27.y ==> You add negative convergence to r24.w and save it in r27.w....r24.w is empty, hence r27.w carrys the negative convergence value???
mad r24.x, r27.x, -r27.w, r24.x ==> You multiplay separation and negative convergence (in case i am right with my first interpretation/understanding) and add r24.x => that is empty and save it to r24.x??
HLSL: (r24.x += r27.x*(-r27.y)+0
mad r24.x, r27.x, r25.x, r24.x ==> You multiply the separation with the depth multiplyer and add the multiplication of the negative convergence (in case i am right with my first interpretation)
HLSL: (r24.x += r27.x*iniparams.x+(r27.x*(-r27.y)+0)
what???
//anyway in my understanding removing stereorization in HLSL is o0.xyzw -= separation*convergence
==>
mul r27.w, r27.x, -r27.y
mul r24.xyzw, o0.xyzw, r27.w
mov o0.xyzw, r24.xyzw
//anyway nothing is working ^^
Where is my understanding fault :-(
// Independend from all this,
why is
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
not working? this should do nothing but disables the shader...hä?
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
THX for your effort. Hopefully you can see the trick ^^ My search was not find any match with a fixed shader of my data base (also including RE7 wip from you)
But hey....its a hot summer...:-)
Will be back on this project tomorrow evening after my day job.....my wife is crying after me once more telling me to make the dinner ready ^^
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
Put the ASM shader code...i can tweak a regex i already have and adapt for those.
I already use that fixing formula from @masterotaku in Frostbite3 fixes...i use that formula because this avoid matrix multiplication and we all know Frostbite3 engine is really "special". The fixing formula is really a good catch!!
MY WEB
Helix Mod - Making 3D Better
My 3D Screenshot Gallery
Like my fixes? you can donate to Paypal: dhr.donation@gmail.com
YEAH and this is what i have done using the MEA fixing formula for "this game" because it looks similar but....seems i did some stupid error because it was not working ^^
OK THX for your help. I will try to write the regex by my own to learn it....i know this is only a synthax thing and i did it before but the problem from me is, i will forgott about it if i dont repeat it several times, hence ill try to keep my lastest knowledge freshed up and try to write the regex. But ill contact you in any case of problems....ill have to chekc if there are more shaders that are exately like this or little different to create a regex that will match all of them....ill be sure ill can make it :-)
The shadow shader is the major problem in this case :-(
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
For doing regex experiments, and getting working syntax, the best tool to use is https://regex101.com/ where you can paste in the original shader, your regex, then see the output directly. This gives you an immediate trial and error and feedback. Far superior to doing it in game.
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
THX THX THX BO3B this is what I was looking for !!!!
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
OK i have tryed to apply this fix to th shader but wohout luck. which position do you mean? I noticed, as often, that only the "first part" if the game is responsible.... but no luck here.
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
if i apply
mul o0.x, o0.x, l(1.0)
i thourgth nothing will be changed because mul by 1 = the original value?
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
This is correct. You cannot read an output register, nor write an input register. It silently fails, just does nothing.
Carefully review the list of gotchas, these are super annoying:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Gotchas
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
This will explain why my applying fix is not working ... the mul by one was only a test ^^
//EDITH:
.... hm .... also this is not working, the effect is disabled:
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
Interesting more detail there. Seems like in that case at least, that it clearly reads a 0 from the o0 register. So it's not exactly nothing, but for that instruction it's not clear what to expect. What is in r50 before this instruction?
We do know that it does not crash the shader or do anything similarly bad, so this is consistent with reading outputs being unusable.
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
This is the shader
I was able to adjust the outpud depth with r9 but it is scaling with the convergence. THourght i cann divide the convergence by it selve to produce 1 as result and mutiply with a constant but failed....
The r50 is not ised in the shader, i also have tryed other registers like r20, same result.
Like my work? Donations can be made via PayPal to: rauti@inetmx.de
Question: is that HUD shader affected by convergence if you don't modify the shader? If the answer is yes:
To sum up, instead of saving all those o0.x, o0.y, o0.z and o0.w individually, save them to r24 for example. Then use that complete r24 to unstereoize it, and then apply your modified depth.
CPU: Intel Core i7 7700K @ 4.9GHz
Motherboard: Gigabyte Aorus GA-Z270X-Gaming 5
RAM: GSKILL Ripjaws Z 16GB 3866MHz CL18
GPU: MSI GeForce RTX 2080Ti Gaming X Trio
Monitor: Asus PG278QR
Speakers: Logitech Z506
Donations account: masterotakusuko@gmail.com
Yes the HUD is afflicted by convergence. I have to think about it tomorrow or some what....stressfull day...applying the lines you have posted will reult in disable the shader....but you wrote its not the full code...
How can i save o0 ?? i thought this is not readable? I also do not understand the lines i think....
(i think there is a basic misunderstanding by my own....??)
add r27.w, r24.w, -r27.y ==> You add negative convergence to r24.w and save it in r27.w....r24.w is empty, hence r27.w carrys the negative convergence value???
mad r24.x, r27.x, -r27.w, r24.x ==> You multiplay separation and negative convergence (in case i am right with my first interpretation/understanding) and add r24.x => that is empty and save it to r24.x??
HLSL: (r24.x += r27.x*(-r27.y)+0
mad r24.x, r27.x, r25.x, r24.x ==> You multiply the separation with the depth multiplyer and add the multiplication of the negative convergence (in case i am right with my first interpretation)
HLSL: (r24.x += r27.x*iniparams.x+(r27.x*(-r27.y)+0)
what???
//anyway in my understanding removing stereorization in HLSL is o0.xyzw -= separation*convergence
==>
mul r27.w, r27.x, -r27.y
mul r24.xyzw, o0.xyzw, r27.w
mov o0.xyzw, r24.xyzw
//anyway nothing is working ^^
Where is my understanding fault :-(
// Independend from all this,
why is
mul r50.xyzw, o0.xyzw, l(1.000000)
mov o0.xyzw, r50.xyzw
not working? this should do nothing but disables the shader...hä?
Like my work? Donations can be made via PayPal to: rauti@inetmx.de