Novum / vkQuake

Vulkan Quake port based on QuakeSpasm
GNU General Public License v2.0
1.8k stars 220 forks source link

[Bug] Certain (water) surfaces move depending on camera angle #391

Closed Vagankovo closed 2 years ago

Vagankovo commented 2 years ago

System info

OS - Arch Linux (rolling) GPU - Radeon RX 5500M & AMD Renoir (integrated graphics) CPU - Ryzen 7 4800H with Radeon Graphics

vkquake version - 1.11.1

Bug

Certain water surfaces move depending on your camera angle. I also have seen other surfaces behave like that. This is a graphical glitch.

Reproduction

HIP1M2 is a good place where this is potentially reproducible.

  1. Load HIP1M2
  2. Go to an area with water
  3. Start looking around in different ways
  4. See how the surfaces move.

Examples in HIP1M2

Screenshot from 2021-11-13 20-33-18 Screenshot from 2021-11-13 20-33-23 Screenshot from 2021-11-13 20-34-28

Example in alk_bdown (mod Alkaline)

Screenshot from 2021-11-13 20-27-15 Screenshot from 2021-11-13 20-27-21

Vagankovo commented 2 years ago

Note: I haven't seen this happen in Quakespasm-Spiked

Novum commented 2 years ago

This is... extremely weird

Vagankovo commented 2 years ago

This seems to be only present when one uses AMDVLK external Vulkan drivers instead of RADV, the AMD Vulkan implementation inside the Mesa graphics libraries. Two possibilities:

  1. The code has incompatibility issues with AMDVLK.
  2. It's a bug within AMDVLK drivers.
Novum commented 2 years ago

Okay, that makes sense because I've never seen this before. Still keeping it open for now, need to check on my AMD machine at some time.

Six-Shoota commented 2 years ago

Same happens in windows with drivers ver. 21.12.1. I haven't had the problem with earlier ver. vkquake0001

Vagankovo commented 2 years ago

... and AMDVLK drivers share code with AMD's drivers for Windows

barneycarroll commented 2 years ago

Came to here to report this. Very odd because I somehow hadn't noticed the phemonenon until the last few days, but it's had debilitating impact on the last 3 maps I've played. I also thought Tears of the False God was a striking example of the bug, lol. It doesn't affect all water brushes, but I can't determine what it is that differentiates the ones that are subject to it and the ones that aren't.

https://user-images.githubusercontent.com/83627/160449873-0001f28e-3d4b-4823-98d2-4580106431fc.mp4

barneycarroll commented 2 years ago

Don't know how helpful this is, but I found an incident with adjacent liquid brushes, some of which exhibit the bug and some which don't. In case this is helpful isolating the cause. Map is Acid Worship

https://user-images.githubusercontent.com/83627/160455282-da1f9873-4ba7-4bcf-8cd4-7ce1b48d1350.mp4

Novum commented 2 years ago

Very useful information. I still haven't had time to investigate this, and I still suspect this is a driver issue.

notathrowaway2 commented 2 years ago

Are you using the latest drivers? I had this issue before but it seems like it was fixed with a recent driver on Windows and Linux.

barneycarroll commented 2 years ago

I just upgraded my AMD drivers to latest (22.3.2, from .1) — the issue persists. Vulkan drivers at 2.0.220, Vulkan API 1.3.206.

notathrowaway2 commented 2 years ago

I just tried an older version of VkQuake(1.12.2) on Windows and the issue still happens with the newest driver. Version 1.13 works fine. On my laptop with Fedora Linux all versions of VkQuake work without issues.

Novum commented 2 years ago

Strange that 1.13 works fine. Maybe it's because I recompiled the shaders with a newer GLSL compiler version.

@barneycarroll can you check if 1.13 fixed it for you too?

barneycarroll commented 2 years ago

Yes — fixed! Sorry I missed the release :)

Novum commented 2 years ago

Okay, closing this then.

barneycarroll commented 2 years ago

Ugh. Just reappeared in vkQuake 1.13 😩. But on an unusual kind of brush — that may be Arcane Dimensions specific? It's a variable alpha blood decal exhibiting the issue here, the kind that appears after gibbing something in AD; I don't know what distinguishes these in technical parlance, but it's definitely the same bug.

This was after gibbing a spider in the Arcane Dimensions map Dreamer's Demesne

https://user-images.githubusercontent.com/83627/160863456-b63db143-1cdb-4991-9bdd-93a344385704.mp4

Shortly afterwards I encountered a blood decal which didn't seem to exhibit the bug, so I recorded that too for comparison — but perhaps it kind of does? We don't see the effect of the surface appearing to move fluidly with camera angle change, but it does flicker in and out. I have noticed vkQuake do texture flickering for some brushes on camera angle change before — it's just a much less debilitating end result. But with quite a few blood splatters like this I will be able to find some point of view at which changing the angle can flicker it out.

https://user-images.githubusercontent.com/83627/160866187-c020e05b-6389-46ce-a9bb-a4adc9f953a5.mp4

In this next instance I was able to manifest both phenomena on (what appears to be) one brush: the special item glow effect from Arcane Dimension. Couldn't upload video directly to Github, so I put it on YouTube. The backpack has a blue foggy glow which appears to move up and down or flick in and out of view, depending on standpoint.

https://youtu.be/HbRNeHV1tyY

Later on I discovered a strange occurence where a bunch of lamps with the same kind of foggy-particulate-glow appeared fine — I've played through this map a couple of times and seen them from all angles — but if I noclipped through the floor I could see them all slide about as though they were one of those buggy water surfaces.

https://youtu.be/TGFpqQqwsOE

Novum commented 2 years ago

Those are completely unrelated and happen in all Quake versions

barneycarroll commented 2 years ago

Couldn't reproduce on QSS (couldn't record it though, the game runs on different video protocols). Should I start a new issue?

Novum commented 2 years ago

Yes