On the right hand side, the barn roof gets a weird shadow moving across it.
Is it not the same as https://www.youtube.com/watch?v=crw8RW6MmII ?
I use default settings.
ShadowsRes = 4096
ShadowsFix = 1
I guess it's time to explain what I did in that video...
Below you can see how the shadows are constrained to a square, in this case it's 256x256 because that's the resolution I'm using. Everything outside of this square are where the artifacts / glitches occur.

If I make the shadows smaller, I can get more of them to show in this limited space. The problem is that this reduces the quality of the shadows, because the decreased size acts like a lower resolution. In this example I'm only changing the width.

I have to increase the resolution to bring the shadows back to normal size. In this case it's 512x256.


In my video the shadows were extended 4x their original size, which means the equivalent of 4096x4096 was 16384x16384; the highest I could possibly go. Despite the absurd increase, there was still one area where you could see this issue in 21:9. Not to mention that going higher than 4096 causes artifacts that you didn't get to see in my video.
My solution could be effective for 16:9 where I only need about 2x the increase. Wider aspect ratios would be fixed too, but with a reduction in shadow quality.
I haven't posted anything about this because it's not my area of expertise. There could be a better solution. I don't know.
Thanks for the post, Aero. I think your solution is better than no solution at any rate ^^ Feel free to post it, otherwise just hold off for a better solution.
@ThirteenAG
I've been thinking about this for a very long time, for months, and in the end I have to agree with Keith94. It doesn't seem possible to completely solve this issue, and it looks like the solution I came up with is the same method the Xbox 360 version uses, including the reduction in shadow quality as a side-effect. It's much better than the ugly artifacts and constant pop-in we have now.
Add everything to FixFOV.
Shadow Pop-In Fix
This will prevent the shadows from popping in and out at the edge of the screen. The value I'm using is arbitrary. Any value over 100 should work.
006C9655 XXXXXXXX
XXXXXXXX 43B40000 // 360.0 float
Shadow "Tearing" Fix
Normally the game scales the shadow map with the camera FOV value, but the method we used for FixFOV doesn't affect this value at all. As a result, the shadow map is never adjusted and the artifacts become more visible with wider aspect ratios. To fix this we have to modify the shadow map function and scale the value for different aspect ratios.
The register the value is moved to is different for almost all of these, so that's why I'm using jmp and not call.
006E4661 jmp XXXXXXXX
XXXXXXXX fild dword ptr [ebx+000000C4] // Loads FOV value
XXXXXXXX fdiv dword ptr [AspectRatio] // Divides by aspect ratio (1.0 = 4:3, 0.75 = 16:9)
XXXXXXXX fistp dword ptr [NewFOV] // Stores new FOV value at address
XXXXXXXX mov eax, dword ptr [NewFOV] // Moves new FOV value to eax
XXXXXXXX jmp 006E4668
006E46A5 jmp XXXXXXXX
XXXXXXXX fild dword ptr [ebx+000000C4] // Loads FOV value
XXXXXXXX fdiv dword ptr [AspectRatio] // Divides by aspect ratio (1.0 = 4:3, 0.75 = 16:9)
XXXXXXXX fistp dword ptr [NewFOV] // Stores new FOV value at address
XXXXXXXX mov ecx, dword ptr [NewFOV] // Moves new FOV value to ecx
XXXXXXXX jmp 006E46AC
006E47DD jmp XXXXXXXX
XXXXXXXX fild dword ptr [ebx+000000C4] // Loads FOV value
XXXXXXXX fdiv dword ptr [AspectRatio] // Divides by aspect ratio (1.0 = 4:3, 0.75 = 16:9)
XXXXXXXX fistp dword ptr [NewFOV] // Stores new FOV value at address
XXXXXXXX mov ecx, dword ptr [NewFOV] // Moves new FOV value to ecx
XXXXXXXX jmp 006E47E4
006E4825 jmp XXXXXXXX
XXXXXXXX fild dword ptr [ebx+000000C4] // Loads FOV value
XXXXXXXX fdiv dword ptr [AspectRatio] // Divides by aspect ratio (1.0 = 4:3, 0.75 = 16:9)
XXXXXXXX fistp dword ptr [NewFOV] // Stores new FOV value at address
XXXXXXXX mov edx, dword ptr [NewFOV] // Moves new FOV value to edx
XXXXXXXX jmp 006E482C
Will do, aiming to take some time next week or the week after.
Implemented in developer build. https://github.com/ThirteenAG/WidescreenFixesPack/commit/9ead2df1561bfff66879eeecbb2d8c676e955b43
Most helpful comment
@ThirteenAG
I've been thinking about this for a very long time, for months, and in the end I have to agree with Keith94. It doesn't seem possible to completely solve this issue, and it looks like the solution I came up with is the same method the Xbox 360 version uses, including the reduction in shadow quality as a side-effect. It's much better than the ugly artifacts and constant pop-in we have now.
Add everything to FixFOV.
Shadow Pop-In Fix
This will prevent the shadows from popping in and out at the edge of the screen. The value I'm using is arbitrary. Any value over 100 should work.
Shadow "Tearing" Fix
Normally the game scales the shadow map with the camera FOV value, but the method we used for FixFOV doesn't affect this value at all. As a result, the shadow map is never adjusted and the artifacts become more visible with wider aspect ratios. To fix this we have to modify the shadow map function and scale the value for different aspect ratios.
The register the value is moved to is different for almost all of these, so that's why I'm using
jmpand notcall.