protonscr

Company of Heroes 3 Italian campaign map "shadow"

vkd3dclosed
HansKristian-Work/vkd3d-proton#2544 · opened 2025-07-08 by Blisto91 · updated 2025-07-16 · 2 comments · github
BBlisto91 2025-07-08 github

In Company of Heroes 3 when you first time get to the Italian campaign map a large "shadow" can be observed on a big part of the map depending on zoom level and angle.

Screenshots

vkd3d-proton amd Windows Vulkan and radv

Image

Native d3d12

Image

It is not a regression from what i could find as it looks the same with vkd3d-proton 2.5.

Reproduction steps

  1. Start the game and make sure "Shadow Quality" is set to High
  2. Start the Italian campaign and once in the first battle hit "escape" and click "SKIP PROLOGUE"
  3. Once on the world map zoom all the way out and observe the shadow covering the northern part of the map. If it doesn't show hold "left alt" and rotate the camera a bit

Software information

Company of Heroes 3
Shadow Quality set to High

System information

  • GPU: RX 7900 xtx
  • Driver: mesa-git (commit d31cb824) and AMD Windows 25.6.2
  • Wine version: Proton Bleeding Edge
  • VKD3D-Proton version: 2.5 - master

Log files

steam-1677280.log

KK0bin 2025-07-08 github

I'll look into this later this week.

KK0bin 2025-07-16 github

Now that the issue is back up:

I did look into it and it's a game bug. The game uses gl_Fragcoord, transforms that with a couple of matrices passed via UBO (presumably to scale and slightly tilt it) and uses that to sample a texture. The cut-off rectangle happens because after the cut-off line, the UV v values are >1.0 and the sampler uses a clamp address mode.

I assume the original intent was for this to be cloud shadows. If I hack in math to make it act like MIRROR_REPEAT, it looks correct. I checked our code and it's really simple, there's nothing pointing towards us ending up with the wrong address mode. It's also a immutable/static sampler which simplifies things a lot.

So in the end, I checked it out on Windows with the Nvidia D3D12 driver.
Low and behold: it shows up as well.

2025073.JPG

Proton versions