Jump to content

Far Cry 2 DX10 Black squares flickering


Recommended Posts

Hello everyone, first post here (but been a contributor for a while) 🙂
I'm currently modding FC2 and I've found a bug that is still present in the vanilla Steam release, when using DX10.
Some of the tweaks suggested on FC2's PCGW entry are wrong (Switching to DX9 does not fix the "silent phone call" bug for instance). It seems that many people think that switching to DX9 fixes everything, but it's not a solution for most of the common issues encountered. I'm thinking about editing the entry, but I need some feedback first. I'm a 3D artist (modeling/texturing) and have experience with HLSL, so I think I know what's going on.

Okay so here's the deal. Far Cry 2's depth buffer, regardless of the renderer used, is cleared every frame. However, DX10 has a better depth pass. The problem I encounter is that when advanced depth/alpha blending occurs (refraction, distorsion...), like shooting in the water (or sometimes just looking at it), black squares flashes for one frame. It also happens if you take an AK, look all the way down and sprint in the grass. Sometimes it happens when aiming down sights when looking at the floor or at any water. 

I'm running the game on a R5 1600x @ 3.95Ghz on all cores, 2x8gb 3400Mhz C14 FlareX RAM, a KFA2 GTX1060 EXOC 6gb with the latest drivers at the time of writing, Win 10 Pro 1909. The game is installed on a Samsung EVO 840 512gb.
The whole system is fully stable, drives are clean, did a fresh install of Win 10 when 1909 came out.


My best guess is that Nvidia or MS broke some legacy stuff, which introduces this bug. I'd like to know if other users with similar and different rigs also suffer from this bug, and if someone has any suggestion for a fix.

Thanks in advance, have a nice day 🙂

Link to comment
Share on other sites

Uhm? I thought graphical glitches in dx10 were due to AlphaToCoverage?

Also.. Yeah, directx breaking phones is pretty stupid fix to be honest (as also discussed by our resident Silent in the comments of the "reference").

Link to comment
Share on other sites

I know that AlphaToCoverage is a well known culprit indeed. I know for a fact that it's set to 0 on my end (both the defaultrenderconfig.xml that's located in the patch.dat file and in the gamerprofile.xml config file). I also forgot to mention that I disabled HBAO through NvInspector to see if it changes something (it has an official DX10 flag and is set to Enabled by default), tried messing with shadercache on/off and different values for ASYNC10_ENABLE, none of which had any significant effect on rendering, because I remember having to setting it to off for Just Cause 2 which is DX10 only.
As for the phone bug I think it's a tick issue because it was present on X360 as well. It's definitely not a renderer issue, but given that you have to restart the game to switch renderers which also fixes the silent call, I can see where people come from with this one.  

Link to comment
Share on other sites

Or maybe dx9 and dx10 performance was different enough for whoever came up with this idea, that it could magically do it.

Anyway.. I don't know, I would exhort you to try harder to disable "gpu stuff". You don't seem to be the first person to report such kind of problems that are known to be fixed with a simple toggle.. Except these days it just doesn't work.

Link to comment
Share on other sites

Something wonky in the Nv drivers it seems.
However, fellow modders did not have the same issue. I ended up shooting in the dark, enabling/disabling everything I could think of that could cause such an issue and of course, it had to be the least likely, most sneaky option I would've never even thought about. Bloom. In DX10 on my rig, with a complete vanilla install, bloom has to be turned off or I get those black squares. Btw, I managed to capture a screenshot of the problem by mashing my screenshot key:

20200508222438_5.jpg

Rather intrusive to say the least. If anyone has the same issue please let me know your specs, drivers and OS. I'm still working on trying to fix that thing, so any feedback would be extremely useful.

Link to comment
Share on other sites

@Mirh

Okay so I've gathered more information about that bug. I'll detail all infos I could gather so far and will edit this post as needed so that if users google it up, they'll at least find something. Mirh, I tagged you to know if you think it should be added to unresolved issues. Regardless I will trim down the fat on FC2's entry soon.

First off, here's a video I actually recorded a year ago while working with Hunter on his Redux mod. At the time, I suspected it was a Near clip plane issue due to editing the FOV. Please watch it at 720p60, or you'll miss it
https://youtu.be/PAlhZzm0ocs?t=55
Second, I'll break down everything we know and possible leads below, and upload a savefile with instructions if anyone wants to replicate it. 

Here's what we know/have tried:
1. The issue occur in DX10 mode, by combining HDR and Bloom. HDR is enabled by default on DX10 and can only be disabled in GamerProfile.xml and set it to read-only - of course, the game looks vastly different that way. Modded Patch.fat/dat or Dunia.dll do not change anything, it'll occur anyway. 

2. Multiple experienced modders confirmed, by replicating it using a provided savefile or just by stumbling upon my research on the Far Cry modding Discord that this bug is years old and can easily be replicated. The bug is not contained in said savefile however, I tried a new game, all vanilla, same deal.
 
2. I can confirm that it is CPU and GPU vendor agnostic. The issue occured on a i7 7700k/GTX1080ti rig as well as on a R9 290x rig. My own PC is a R5 1600x/GTX1060 6GB. All those tests were done to replicate the issue on purpose, and were conducted on Windows 10. 

3. The usual suspect have been ruled out: turning off "game mode", clean boot & reinstall, run as admin, with and without Reshade, using "disable fullscreen optimization", disabling color correction in the Nvidia control panel and leaving it to the application, cleaning related entries in the registry, installing on the C:\ drive, enabling/disabling each and every settings, even reverting my overclock and downcore my R5 1600x to two cores. 

4. We suspected that it may come from WDDM. I tried installing the game on a AM2 Athlon 64 X2 4400+ & GT430, Win 7 rig. Same thing as on Win 10. We did not try on Vista/XP or on AMD APUs & Intel iGPUs.


5. We were not able to pinpoint the issue for sure. Special K, 3DMigoto and RenderDoc do not work with DX10, so I cannot take a look at what's happening. However, black squares appear when ADS when looking all the way down on road that have parallax, sprint through grass, or look at water. In those cases, it seems that the Adaptive Bloom, which correct the exposure of the screen, "misses" a part of the screen - so, mostly things that use alpha blending.

6. The Steam and GoG versions are affected, both being version 1.03 (last to date). 

7. We can unpack shaders, and get compiled .pso & .vso. I do not know how to edit compiled shaders apart from Hex editing, which isn't my strong suit.

All of this pretty much narrow the issue down to Windows past 7 and upor Ubisoft broke something when they introduced the Widescreen patch (1.01 I believe).
Of course there's few chances that it'll ever be fixed, but for archive purpose it's there. 

Attached to this post is a savefile if you want to help out. It takes about a minute.
Launch the game in DX10 mode, set everything to ultra and enable Vsync (the squares are smaller the higher the framerate is, this is because the frame buffer is cleared every frame). Make sure Bloom is ticked. 
From where you spawn, go to your left and follow the road where the jeep is. That road has parallax. Go near the end of it by sprinting heads down, you might see those squares already. At the end of that small path, still on that parallax'd road, ADS with the AK, look all the way down and turn around on yourself. You should see black squares covering the back of the AK. 

 

445512936171.sav

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   0 Members, 0 Anonymous, 253 Guests (See full list)

    • There are no registered users currently online
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.8k
    Total Topics
    9.2k
    Total Posts
×
×
  • Create New...