Dark Souls 2 Scholar of the First Sin Direct X11 version
  4 / 7    
[quote="DHR"]Can you upload a screenshot with the fix multiply by -0.33333? the shadows looks good with that value (2.4 convergence and 100% depth)?[/quote] They don't look good because at bigger distances they need more convergence to be at the depth of the surface, but that breaks the lower part of the shadow because it needs less convergence. The shadows have fixed depth no matter the distance, and to look correct it should change with distance. Here's a screenshot where you can see the problem: https://www.dropbox.com/s/xqs5jd2ku7jq6ia/DarkSoulsII166.jps?dl=0 For example, the separation at the top of the sword is the same as the separation at the feet. [quote="DHR"]the frame analysis sould give you a text file, inside that file there are the register that need to check.[/quote] Nope. Inside the "FrameAnalysis-2015-11-02-124109" folder there are only jps files. Outside of the folder, no new files. I used these options for the frame analisys: "analyse_options = dump_rt_jps clear_rt". Edit: another screenshot: https://www.dropbox.com/s/xqs5jd2ku7jq6ia/DarkSoulsII166.jps?dl=0
DHR said:Can you upload a screenshot with the fix multiply by -0.33333? the shadows looks good with that value (2.4 convergence and 100% depth)?

They don't look good because at bigger distances they need more convergence to be at the depth of the surface, but that breaks the lower part of the shadow because it needs less convergence. The shadows have fixed depth no matter the distance, and to look correct it should change with distance. Here's a screenshot where you can see the problem: https://www.dropbox.com/s/xqs5jd2ku7jq6ia/DarkSoulsII166.jps?dl=0

For example, the separation at the top of the sword is the same as the separation at the feet.

DHR said:the frame analysis sould give you a text file, inside that file there are the register that need to check.

Nope. Inside the "FrameAnalysis-2015-11-02-124109" folder there are only jps files. Outside of the folder, no new files. I used these options for the frame analisys: "analyse_options = dump_rt_jps clear_rt".

Edit: another screenshot: https://www.dropbox.com/s/xqs5jd2ku7jq6ia/DarkSoulsII166.jps?dl=0

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

#46
Posted 11/02/2015 12:30 PM   
Use the last 3Dmigoto (1.2.6), in that version DarkStarSword add the same names for register tag in the frame analysis txt. Use this config, this will dump txt: [code]analyse_options = dump_rt_jps clear_rt dump_cb_txt[/code] (dump_cb_txt: Decodes constant buffers as an array of float4s)
Use the last 3Dmigoto (1.2.6), in that version DarkStarSword add the same names for register tag in the frame analysis txt.

Use this config, this will dump txt:
analyse_options = dump_rt_jps clear_rt dump_cb_txt


(dump_cb_txt: Decodes constant buffers as an array of float4s)

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#47
Posted 11/02/2015 02:10 PM   
I was already using the latest 3Dmigoto. I added that option and now I got these txt files related to the pixel shader (jps file included): https://www.dropbox.com/s/kqf7nlbvrfbiut8/DS2_text_files.7z?dl=0 This time the multiplier I used was "-0.43212", just to make sure it's a number that has low chances of appearing by itself. In those files I couldn't find that number. I don't know what to do with the content of those files now.
I was already using the latest 3Dmigoto. I added that option and now I got these txt files related to the pixel shader (jps file included): https://www.dropbox.com/s/kqf7nlbvrfbiut8/DS2_text_files.7z?dl=0


This time the multiplier I used was "-0.43212", just to make sure it's a number that has low chances of appearing by itself. In those files I couldn't find that number. I don't know what to do with the content of those files now.

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

#48
Posted 11/02/2015 03:11 PM   
For example if i take this file: 000957-ps-cb6-vs=e43b9b2d6333b956-ps=067216403dcf8557.txt [code]//PS header info cbuffer cbScreenSpaceShadow : register(b6) { row_major float4x4 g_InvProjMatrixT : packoffset(c0); row_major float4x4 g_ProjSpaceToShadowMatrixT[4] : packoffset(c4); float4 g_CascadeSelectDist : packoffset(c20); float4 g_vDepthComputeParam : packoffset(c21); float4 g_avSampleOffsets[16] : packoffset(c22); } **Frame Analysis //g_InvProjMatrixT cb6[0].x: 0.718268812 cb6[0].y: 0 cb6[0].z: 0 cb6[0].w: 0 cb6[1].x: 0 cb6[1].y: 0.404026181 cb6[1].z: 0 cb6[1].w: 0 cb6[2].x: 0 cb6[2].y: 0 cb6[2].z: 0 cb6[2].w: 0.99999994 cb6[3].x: 0 cb6[3].y: 0 cb6[3].z: -9.99979877 cb6[3].w: 9.99999905 //g_ProjSpaceToShadowMatrixT cb6[4].x: 0.00737494789 cb6[4].y: 0.00066095934 cb6[4].z: -0.938530028 cb6[4].w: 0.944805145 cb6[5].x: 0.000965718529 cb6[5].y: -0.00485768495 cb6[5].z: -2.26442289 cb6[5].w: 2.26540542 cb6[6].x: -0.00155228085 cb6[6].y: 1.37905909e-005 cb6[6].z: -8.50659943 cb6[6].w: 8.51030731 cb6[7].x: 0 cb6[7].y: 0 cb6[7].z: -9.99979877 cb6[7].w: 9.99999905[/code] And the other one listed in the header info. You can see that "FC_FarClipInfo" and "FC_ScreenSize" are used....FC_ScreenSize.x = 1920 and FC_ScreenSize.y = 1080 [code]//PS header info cbuffer cbBase : register(b0) { float4 FC_DifColMul : packoffset(c0); float FC_GlobalTime : packoffset(c1); row_major float3x4 FC_MatrixViewT : packoffset(c2); float4 FC_FarClipInfo : packoffset(c5); float4 FC_ShadowMapParam : packoffset(c6); float4 FC_ShadowColor : packoffset(c7); float4 FC_ScreenSize : packoffset(c8); float4 FC_FinalColorMult : packoffset(c9); } **Frame Analysis //FC_DifColMul cb0[0].x: 1 cb0[0].y: 1 cb0[0].z: 1 cb0[0].w: 1 //FC_GlobalTime cb0[1].x: 296.830688 cb0[1].y: 0 cb0[1].z: 0 cb0[1].w: 0 //FC_MatrixViewT cb0[2].x: -0.305640876 cb0[2].y: 0 cb0[2].z: 0.952146888 cb0[2].w: 4.85031319 cb0[3].x: -0.240871593 cb0[3].y: 0.967472196 cb0[3].z: -0.0773202181 cb0[3].w: -18.6872196 cb0[4].x: -0.921175659 cb0[4].y: -0.252977371 cb0[4].z: -0.29569906 cb0[4].w: -35.2354927 //FC_FarClipInfo cb0[5].x: 4993.31934 cb0[5].y: 0.00020026759 cb0[5].z: 0 cb0[5].w: 0 //FC_ShadowMapParam cb0[6].x: 310 cb0[6].y: 0.100000001 cb0[6].z: 0.000122070313 cb0[6].w: 0.000122070313 //FC_ShadowColor cb0[7].x: 1 cb0[7].y: 1 cb0[7].z: 1 cb0[7].w: 0.00499999942 //FC_ScreenSize cb0[8].x: 1920 cb0[8].y: 1080 cb0[8].z: 0.00052083336 cb0[8].w: 0.00092592591 //FC_FinalColorMult cb0[9].x: 1 cb0[9].y: 1 cb0[9].z: 1 cb0[9].w: 1[/code] Multiply by "FC_MatrixViewT.x" maybe a good candidate. This part is start to try, the good thing is in this game you have the header info, also farclip (Far .x and near .y) and screensize are used.
For example if i take this file: 000957-ps-cb6-vs=e43b9b2d6333b956-ps=067216403dcf8557.txt

//PS header info
cbuffer cbScreenSpaceShadow : register(b6)
{
row_major float4x4 g_InvProjMatrixT : packoffset(c0);
row_major float4x4 g_ProjSpaceToShadowMatrixT[4] : packoffset(c4);
float4 g_CascadeSelectDist : packoffset(c20);
float4 g_vDepthComputeParam : packoffset(c21);
float4 g_avSampleOffsets[16] : packoffset(c22);
}

**Frame Analysis

//g_InvProjMatrixT
cb6[0].x: 0.718268812
cb6[0].y: 0
cb6[0].z: 0
cb6[0].w: 0

cb6[1].x: 0
cb6[1].y: 0.404026181
cb6[1].z: 0
cb6[1].w: 0

cb6[2].x: 0
cb6[2].y: 0
cb6[2].z: 0
cb6[2].w: 0.99999994

cb6[3].x: 0
cb6[3].y: 0
cb6[3].z: -9.99979877
cb6[3].w: 9.99999905

//g_ProjSpaceToShadowMatrixT
cb6[4].x: 0.00737494789
cb6[4].y: 0.00066095934
cb6[4].z: -0.938530028
cb6[4].w: 0.944805145

cb6[5].x: 0.000965718529
cb6[5].y: -0.00485768495
cb6[5].z: -2.26442289
cb6[5].w: 2.26540542

cb6[6].x: -0.00155228085
cb6[6].y: 1.37905909e-005
cb6[6].z: -8.50659943
cb6[6].w: 8.51030731

cb6[7].x: 0
cb6[7].y: 0
cb6[7].z: -9.99979877
cb6[7].w: 9.99999905



And the other one listed in the header info.
You can see that "FC_FarClipInfo" and "FC_ScreenSize" are used....FC_ScreenSize.x = 1920 and FC_ScreenSize.y = 1080

//PS header info
cbuffer cbBase : register(b0)
{
float4 FC_DifColMul : packoffset(c0);
float FC_GlobalTime : packoffset(c1);
row_major float3x4 FC_MatrixViewT : packoffset(c2);
float4 FC_FarClipInfo : packoffset(c5);
float4 FC_ShadowMapParam : packoffset(c6);
float4 FC_ShadowColor : packoffset(c7);
float4 FC_ScreenSize : packoffset(c8);
float4 FC_FinalColorMult : packoffset(c9);
}

**Frame Analysis

//FC_DifColMul
cb0[0].x: 1
cb0[0].y: 1
cb0[0].z: 1
cb0[0].w: 1

//FC_GlobalTime
cb0[1].x: 296.830688
cb0[1].y: 0
cb0[1].z: 0
cb0[1].w: 0

//FC_MatrixViewT
cb0[2].x: -0.305640876
cb0[2].y: 0
cb0[2].z: 0.952146888
cb0[2].w: 4.85031319

cb0[3].x: -0.240871593
cb0[3].y: 0.967472196
cb0[3].z: -0.0773202181
cb0[3].w: -18.6872196

cb0[4].x: -0.921175659
cb0[4].y: -0.252977371
cb0[4].z: -0.29569906
cb0[4].w: -35.2354927

//FC_FarClipInfo
cb0[5].x: 4993.31934
cb0[5].y: 0.00020026759
cb0[5].z: 0
cb0[5].w: 0

//FC_ShadowMapParam
cb0[6].x: 310
cb0[6].y: 0.100000001
cb0[6].z: 0.000122070313
cb0[6].w: 0.000122070313

//FC_ShadowColor
cb0[7].x: 1
cb0[7].y: 1
cb0[7].z: 1
cb0[7].w: 0.00499999942

//FC_ScreenSize
cb0[8].x: 1920
cb0[8].y: 1080
cb0[8].z: 0.00052083336
cb0[8].w: 0.00092592591

//FC_FinalColorMult
cb0[9].x: 1
cb0[9].y: 1
cb0[9].z: 1
cb0[9].w: 1



Multiply by "FC_MatrixViewT.x" maybe a good candidate.

This part is start to try, the good thing is in this game you have the header info, also farclip (Far .x and near .y) and screensize are used.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#49
Posted 11/02/2015 07:46 PM   
Try with those codes (same place than before). Those are modifications of the Cryengine shadows pattern, is similar in this game....but in Cryengine we need to take the NearClip and Screensize from VS.....and in Cryengine there is no header.....DarkStarSword cracked down those register using Frame Analysis. Option 1: [code] float4 stereo = StereoParams.Load(0); float depth = r0.z * FC_FarClipInfo.x; r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x;[/code] Option 2: [code] float4 stereo = StereoParams.Load(0); float depth = r0.z * FC_FarClipInfo.y; r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x;[/code] Try using combination of both changing the CORRECTION part...... divide by 2, divide by depth, etc....example: [code] float4 stereo = StereoParams.Load(0); float depth = r0.z * FC_FarClipInfo.y; r0.x -= stereo.x * (depth - stereo.y) / depth * FC_ScreenSize.x;[/code] [code] float4 stereo = StereoParams.Load(0); float depth = r0.z * FC_FarClipInfo.y; r0.x -= stereo.x * (depth - stereo.y) / depth * FC_ScreenSize.x / 2;[/code] [code] float4 stereo = StereoParams.Load(0); float depth = r0.z * FC_FarClipInfo.y; r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x / 2;[/code] You need to try different options. Hope one of the options works...
Try with those codes (same place than before).

Those are modifications of the Cryengine shadows pattern, is similar in this game....but in Cryengine we need to take the NearClip and Screensize from VS.....and in Cryengine there is no header.....DarkStarSword cracked down those register using Frame Analysis.


Option 1:
float4 stereo = StereoParams.Load(0);
float depth = r0.z * FC_FarClipInfo.x;
r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x;


Option 2:
float4 stereo = StereoParams.Load(0);
float depth = r0.z * FC_FarClipInfo.y;
r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x;


Try using combination of both changing the CORRECTION part...... divide by 2, divide by depth, etc....example:

float4 stereo = StereoParams.Load(0);
float depth = r0.z * FC_FarClipInfo.y;
r0.x -= stereo.x * (depth - stereo.y) / depth * FC_ScreenSize.x;


float4 stereo = StereoParams.Load(0);
float depth = r0.z * FC_FarClipInfo.y;
r0.x -= stereo.x * (depth - stereo.y) / depth * FC_ScreenSize.x / 2;


float4 stereo = StereoParams.Load(0);
float depth = r0.z * FC_FarClipInfo.y;
r0.x -= stereo.x * (depth - stereo.y) * FC_ScreenSize.x / 2;



You need to try different options.

Hope one of the options works...

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#50
Posted 11/02/2015 08:10 PM   
Thank you for the help and suggestions. No luck with any of those. Some of them made shadows disappear (particularly the ones that used "FC_FarClipInfo.x" or the ones thay multiplied by the screen size. Sometimes enormous shadows appeared as I moved the camera), and others just added more separation to the shadows, in the same incorrect way as before. I tried more variations without success, but I'm done for today. I'll be very surprised if this gets fixed someday.
Thank you for the help and suggestions.

No luck with any of those. Some of them made shadows disappear (particularly the ones that used "FC_FarClipInfo.x" or the ones thay multiplied by the screen size. Sometimes enormous shadows appeared as I moved the camera), and others just added more separation to the shadows, in the same incorrect way as before.

I tried more variations without success, but I'm done for today. I'll be very surprised if this gets fixed someday.

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

#51
Posted 11/02/2015 10:52 PM   
That's why Shadows/Lights are difficult... need some test and need some time. More fix ideas: [code]float4 stereo = StereoParams.Load(0); r0.x -= stereo.x * (r0.z - stereo.y) * g_InvProjMatrixT._m00;[/code] [code]float4 stereo = StereoParams.Load(0); r0.x -= stereo.x * (r0.z - stereo.y) * g_InvProjMatrixT._m11;[/code] And others variant...divide by g_InvProjMatrixT(both) instead *; divide by 2. Also never seen this (the [r1.y/4]): [code]g_ProjSpaceToShadowMatrixT[r1.y/4][/code] So maybe is neccesary to use that r1.y in the fix. The other way is to work the inverse matrix of g_ProjSpaceToShadowMatrixT.
That's why Shadows/Lights are difficult... need some test and need some time.

More fix ideas:

float4 stereo = StereoParams.Load(0);
r0.x -= stereo.x * (r0.z - stereo.y) * g_InvProjMatrixT._m00;


float4 stereo = StereoParams.Load(0);
r0.x -= stereo.x * (r0.z - stereo.y) * g_InvProjMatrixT._m11;


And others variant...divide by g_InvProjMatrixT(both) instead *; divide by 2.


Also never seen this (the [r1.y/4]):
g_ProjSpaceToShadowMatrixT[r1.y/4]


So maybe is neccesary to use that r1.y in the fix.


The other way is to work the inverse matrix of g_ProjSpaceToShadowMatrixT.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#52
Posted 11/02/2015 11:28 PM   
I did iiiiiiiiiiiiiittttt!!!! The right formula was: [code] r0.x+=separation*(dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw)-convergence); [/code] Or simplified: [code] float depth=dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw); r0.x+=separation*(depth-convergence); [/code] I don't know why I didn't try to use that "dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw)" before. It's used just a few lines later to define "r2.w". But it only works correctly at 1.0 convergence. I'll fix it to work at any setting. It's a bit late today, but I'll try to finish it before going to bed. If not, tomorrow. Thank you all for your help. Even if I found the formula myself, your suggestions may prove useful in the future. Edit: hmmm, fixing it to work at any convergence setting is more difficult than I thought. After a few minutes I couldn't even change the perfect spot to other convergence setting.
I did iiiiiiiiiiiiiittttt!!!!

The right formula was:

r0.x+=separation*(dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw)-convergence);


Or simplified:
float depth=dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw);
r0.x+=separation*(depth-convergence);


I don't know why I didn't try to use that "dot(g_ProjSpaceToShadowMatrixT[r1.y/4]._m30_m31_m32_m33, r0.xyzw)" before. It's used just a few lines later to define "r2.w".

But it only works correctly at 1.0 convergence. I'll fix it to work at any setting. It's a bit late today, but I'll try to finish it before going to bed. If not, tomorrow.

Thank you all for your help. Even if I found the formula myself, your suggestions may prove useful in the future.

Edit: hmmm, fixing it to work at any convergence setting is more difficult than I thought. After a few minutes I couldn't even change the perfect spot to other convergence setting.

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

#53
Posted 11/03/2015 09:59 PM   
GREAT!!!! You still need the correction part to work with any convergence: [code]r0.x+=separation*(depth-convergence) * CORRECTION;[/code] Should be something simple like this, for convergence = 1.0 will work: [code]r0.x+=separation*(depth-convergence) * convergence;[/code] Or you can use a fix value, let say "1.2" for the correction that works with convergence = 1.8 and run the Frame Analysis....now you can look what register have the "1.2" value and use it in the correcion part. Again this value can be: value, 1/value or similar. Also if the game have different FOV option, or in some scenes the FOV changes...you need to test the fix there also.
GREAT!!!!

You still need the correction part to work with any convergence:
r0.x+=separation*(depth-convergence) * CORRECTION;



Should be something simple like this, for convergence = 1.0 will work:
r0.x+=separation*(depth-convergence) * convergence;


Or you can use a fix value, let say "1.2" for the correction that works with convergence = 1.8 and run the Frame Analysis....now you can look what register have the "1.2" value and use it in the correcion part. Again this value can be: value, 1/value or similar.

Also if the game have different FOV option, or in some scenes the FOV changes...you need to test the fix there also.

MY WEB

Helix Mod - Making 3D Better

My 3D Screenshot Gallery

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

#54
Posted 11/03/2015 11:19 PM   
Fantastic, well done!
Fantastic, well done!

#55
Posted 11/04/2015 08:37 AM   
With the knowledge of the shadows fix, I remade the lighting fix for the lighting that was at screen depth. This time it is 100% accurate... buuuut as with the shadows, only at 1.0 convergence :p. I tried to overcome that limit for the shadows, but I still can't find a way to not break them again. As a side note, I've also improved the lighting of bonfires. Now the lighting doesn't suddenly change when you're close. At this moment, it's perfect at convergence 0. If I manage to make it perfect at least at convergence 1.0, it will be a good improvement (and it will fix shadows produced by the bonfires). I'll be afk most of the time tomorrow and saturday, so I won't be able to keep working on this until Sunday, probably.
With the knowledge of the shadows fix, I remade the lighting fix for the lighting that was at screen depth. This time it is 100% accurate... buuuut as with the shadows, only at 1.0 convergence :p. I tried to overcome that limit for the shadows, but I still can't find a way to not break them again.

As a side note, I've also improved the lighting of bonfires. Now the lighting doesn't suddenly change when you're close. At this moment, it's perfect at convergence 0. If I manage to make it perfect at least at convergence 1.0, it will be a good improvement (and it will fix shadows produced by the bonfires).

I'll be afk most of the time tomorrow and saturday, so I won't be able to keep working on this until Sunday, probably.

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

#56
Posted 11/05/2015 10:30 PM   
Yaaay, more things are fixed! Now ALL shadows are correct (bonfire shadows, shadows in Majula mansion, shadows in places that had lighting at screen depth, No-Man's Wharf and everything else you can think about, probably), and of course all lighting. Shadows at the "low" setting didn't work with the fix that corrected the pixel shaders of shadows medium/high and no shadows. By the way, same as previous things fixed: only at 1.0 convergence. Once I figure this out (with maybe some of your help), it will probably be appliable to all shaders that currently need 1.0 convergence. Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today. I'll post the current state of the fix and how I did a few things on Sunday.
Yaaay, more things are fixed! Now ALL shadows are correct (bonfire shadows, shadows in Majula mansion, shadows in places that had lighting at screen depth, No-Man's Wharf and everything else you can think about, probably), and of course all lighting. Shadows at the "low" setting didn't work with the fix that corrected the pixel shaders of shadows medium/high and no shadows.

By the way, same as previous things fixed: only at 1.0 convergence. Once I figure this out (with maybe some of your help), it will probably be appliable to all shaders that currently need 1.0 convergence.

Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today.

I'll post the current state of the fix and how I did a few things on Sunday.

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

#57
Posted 11/07/2015 12:10 AM   
This is great news, I'll have to pick it up now.
This is great news, I'll have to pick it up now.

#58
Posted 11/07/2015 05:01 AM   
[quote="masterotaku"]Yaaay, more things are fixed! Now ALL shadows are correct (bonfire shadows, shadows in Majula mansion, shadows in places that had lighting at screen depth, No-Man's Wharf and everything else you can think about, probably), and of course all lighting. Shadows at the "low" setting didn't work with the fix that corrected the pixel shaders of shadows medium/high and no shadows. By the way, same as previous things fixed: only at 1.0 convergence. Once I figure this out (with maybe some of your help), it will probably be appliable to all shaders that currently need 1.0 convergence. Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today. I'll post the current state of the fix and how I did a few things on Sunday.[/quote] The work is seriously appreciated. It seems like you're learning a lot, and I'm glad the learning can be done on a game such as Dark Souls II !
masterotaku said:Yaaay, more things are fixed! Now ALL shadows are correct (bonfire shadows, shadows in Majula mansion, shadows in places that had lighting at screen depth, No-Man's Wharf and everything else you can think about, probably), and of course all lighting. Shadows at the "low" setting didn't work with the fix that corrected the pixel shaders of shadows medium/high and no shadows.

By the way, same as previous things fixed: only at 1.0 convergence. Once I figure this out (with maybe some of your help), it will probably be appliable to all shaders that currently need 1.0 convergence.

Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today.

I'll post the current state of the fix and how I did a few things on Sunday.


The work is seriously appreciated. It seems like you're learning a lot, and I'm glad the learning can be done on a game such as Dark Souls II !

#59
Posted 11/08/2015 12:10 AM   
I was wrong about one of my latest statements: [quote]Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today.[/quote] Actually, everything is fixed (other than the sun rays, that are disabled). I was checking those things I said with the incorrect convergence. By the way, fixing the lighting also fixed reflections on the body, weapons and armor, and also the moon reflection at Drangleic Castle. I've been checking many areas today and everything looked correct (shadows, lighting, reflections, etc). I've changed some hotkeys: - F4: 100 depth, 2.4 convergence (it would be my favorite setting if everything worked with it). - F5: 85 depth, 2.4 convergence (same convergence, but reduced depth to fix the fire heatwave effect). - F6: 85 depth, 1.0 convergence (the setting you have to use to see all effects correctly). Here's the current fix: https://www.dropbox.com/s/pnahs4uvdv2osfb/DS2_SOTFS_fix_1.4.7z?dl=0 The only remaining thing is to make everything look correct at any convergence setting. I haven't found the correct formula yet. Other than that, I think I can call the fix "complete". I've learned a lot thanks to the people that helped me and the people being happy about the fix, as well as my own interest :p. Now it's time to ask for help: I'll explain how I fixed the lighting. In the vertex shader ("0b9a4f4bd9c5b45a-vs_replace.txt"), I just added this line (after adding the needed register): [code] o0.x-=separation*(dot(g_InvProjMatrixT._m30_m31_m32_m33, r0.xyzw)-convergence); [/code] Then in the pixel shaders I added something like this: [code] r1.x-=separation*(r1.w-convergence); r1.x+=separation*(dot(g_InvProjMatrixT._m30_m31_m32_m33, r1.xyzw)-convergence); [/code] In some cases it was r1, r2, r3, etc. Always at the same step. For the shadows I used a different variable that I posted in this page. In the shadows case, dividing the last modified line by "(depth+convergence)" moved the good spot to about 1.4 convergence, but its depth wasn't perfect and it just changed the needed convergence. Any more ideas? I'll keep trying stuff, anyway. Now I'll be playing Ys VI in the meantime, and when this is totally fixed, I'll start New Game + to replay the game with all effects enabled.
I was wrong about one of my latest statements:

Aside from that convergence limitation, I think the only remaining thing is fixing depth of the item/chest drops lighting (shared with just a few other things) that currently is pefect at 0 convergence, same as the things I fixed today.


Actually, everything is fixed (other than the sun rays, that are disabled). I was checking those things I said with the incorrect convergence.

By the way, fixing the lighting also fixed reflections on the body, weapons and armor, and also the moon reflection at Drangleic Castle. I've been checking many areas today and everything looked correct (shadows, lighting, reflections, etc).

I've changed some hotkeys:

- F4: 100 depth, 2.4 convergence (it would be my favorite setting if everything worked with it).
- F5: 85 depth, 2.4 convergence (same convergence, but reduced depth to fix the fire heatwave effect).
- F6: 85 depth, 1.0 convergence (the setting you have to use to see all effects correctly).

Here's the current fix: https://www.dropbox.com/s/pnahs4uvdv2osfb/DS2_SOTFS_fix_1.4.7z?dl=0


The only remaining thing is to make everything look correct at any convergence setting. I haven't found the correct formula yet. Other than that, I think I can call the fix "complete".

I've learned a lot thanks to the people that helped me and the people being happy about the fix, as well as my own interest :p.

Now it's time to ask for help:

I'll explain how I fixed the lighting. In the vertex shader ("0b9a4f4bd9c5b45a-vs_replace.txt"), I just added this line (after adding the needed register):

o0.x-=separation*(dot(g_InvProjMatrixT._m30_m31_m32_m33, r0.xyzw)-convergence);


Then in the pixel shaders I added something like this:

r1.x-=separation*(r1.w-convergence);
r1.x+=separation*(dot(g_InvProjMatrixT._m30_m31_m32_m33, r1.xyzw)-convergence);


In some cases it was r1, r2, r3, etc. Always at the same step.

For the shadows I used a different variable that I posted in this page. In the shadows case, dividing the last modified line by "(depth+convergence)" moved the good spot to about 1.4 convergence, but its depth wasn't perfect and it just changed the needed convergence.

Any more ideas? I'll keep trying stuff, anyway. Now I'll be playing Ys VI in the meantime, and when this is totally fixed, I'll start New Game + to replay the game with all effects enabled.

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

#60
Posted 11/08/2015 06:37 PM   
  4 / 7    
Scroll To Top