protonscr

Battlefield 3 clouds are black in mission Going Hunting

dxvkclosed
doitsujin/dxvk#5857 · opened 2026-08-24 by Lassebq · updated 2026-08-24 · 8 comments · github
LLassebq 2026-08-24 github

Software information

Battlefield 3

System information

  • GPU: RX 6700 XT + Ryzen 4600G integrated graphics
  • Driver: RADV / (AMD on Windows)
  • Wine version: wine-cachyos 11.0.20260702 (built from git)
  • DXVK version: 3.0.2

Apitrace file(s)

Windows and Linux DXVK:
Image

Windows DirectX:
Image

With apitrace and DXVK:
Image

Ddoitsujin maintainer 2026-08-24 github

Was the trace recorded on Linux? Probably more helpful to have one from native Windows directly. For some reason it also crashes on replay unless I hack dxvk to never delete any objects, so I can't check if it happens on wined3d or native d3d either.

All that said, I don't really see any reason why the clouds wouldn't be black, the game multiplies the color with some dot product involving a non-normalized normal vector that ends up getting clamped to 0, and the data that causes that to happen all comes from constant buffers which are written by the game's CPU code. Maybe try DXVK_CONFIG="dxvk.zeroMappedMemory=True" or DXVK_CONFIG="dxgi.hideAmdGpu=True", something about this screams game bug.

LLassebq 2026-08-24 github

Yes. I recorded the trace on Linux with DXVK. The game refuses to start on WineD3D so I can't test whenever this bug is present there. I was also trying to get a renderdoc trace since it supports individual frame capture, but I had difficulty getting it to work in wine wow64 with a 32 bit game like BF3.

I can capture an apitrace on Windows, sure.

LLassebq 2026-08-24 github

Can't take apitrace on Windows. For some reason I completely lose input and can't get past the "Press Enter to begin" after the startup movie. I got renderdoc capture directly on Windows though. Would that be useful?

Ddoitsujin maintainer 2026-08-24 github

Assuming it's an actual D3D11 capture then I'll take it, better than nothing.

Ddoitsujin maintainer 2026-08-24 github

Thanks. Annoyingly this renders properly when replaying with DXVK, but there's a nonzero chance that the turbocursed render-to-buffer thing that we don't currently support has something to do with it.

That said, the game uses different shaders for rendering the clouds than it does in the apitrace for some reason.

Ddoitsujin maintainer 2026-08-24 github

Please try #5858. Not really tested, but does appear to work with the RenderDoc capture at least.

Here's a build in case you can't build yourself since our CI is currently borked:
dxvk-bf3.tar.gz

LLassebq 2026-08-24 github

It worked! Thank you for this quick fix