HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.89k stars 198 forks source link

Ratchet & Clank - blocky corruption when looking at rift portals #1833

Closed aufkrawall closed 9 months ago

aufkrawall commented 9 months ago

There is blocky corruption when looking at rift portals: 1895880_20240112000035_1

Happens with both RADV & amdvlk. Doesn't happen with native D3D12. Issue seems to disappear at some rendering/upsampling resolutions, but happens at most of them and also native 1440p TAA.

Software information

Ratchet & Clank, latest Steam version, maximum settings (RT off), TAA, 1440p

System information

Log files

steam-1895880.7z.zip

Blisto91 commented 9 months ago

Can you highlight where on the image the issue is? I'm not sure i see it

aufkrawall commented 9 months ago

Sure: 1895880_20240112000035_1

Edit: Btw: Some textures/decals sometimes don't seem to load at high resolution (textures set to very high). But don't know if native D3D12 has the same issues (it stutters more though).

Blisto91 commented 9 months ago

I haven't been able to reproduce this ingame at the same spot so far with either amdvlk or radv on my RX 6800. I have a 1080p monitor but tried faking 1440p with gamescope and also tried different upscaling techniques.

Will try again with rdna3 later.

aufkrawall commented 9 months ago

Thanks!

For whatever reason, I now can't reproduce with 100% TAA anymore either. But with any upscaler set to "quality", it triggers the issue: 1895880_20240113233318_1 1895880_20240113233306_1

aufkrawall commented 9 months ago

The issue seems to be caused by XeGTAO.

Blisto91 commented 9 months ago

Okay sorry yes i can reproduce it now.

Attached a Vulkan renderdoc capture made with XeGTAO and XeSS on a RX 6800 with radv 23.3.3. Notice that the right side of the portal is darker which is the side with the glitching (it can move with the camera) https://drive.proton.me/urls/Y0XQZRP5G0#zSl7mhPv75bL

HansKristian-Work commented 9 months ago

I reproduce this on Windows too.

portal-bug

HansKristian-Work commented 9 months ago

The portal rendering seems to be contained within a bounding box.

There is an offset applies to the GlobalThreadID when writing the input to XeGTAO buffers.

copy_input

But in the CS_XeGtaoFinalize pass, there is no offset in the shader, so the portal AO gets a sliced copy.

final

final2

That causes either darkening or garbage in the right half.

HansKristian-Work commented 9 months ago

Closing as not our bug.

aufkrawall commented 9 months ago

Thanks for looking into this and your detailed explanation, really appreciated! I guess then it's hardly noticeable on Windows for some random/racy reasons.

Btw. did you notice that some textures aren't streamed in full resolution with VKD3D-Proton? It seems to match the result on Windows when you delete the DirectStorage DLLs there. 1895880_20240119173548_1

Windows with DS: RiftApart_2024_01_19_17_41_25_268

This is right after loading the level for the first time, no RT.

aufkrawall commented 8 months ago

@Blisto91 Can I convince you to check whether you can confirm the texture issue? :)