Facepunch / sbox-issues

175 stars 12 forks source link

Rendering issue with glass materials on AMD Radeon Graphics #5956

Closed Zyro1331 closed 1 month ago

Zyro1331 commented 1 month ago

Describe the bug

Upon starting the game with VSync disabled, glass materials exhibit a strange constantly flickering and flashing issue. Brightly strobing various colors until VSync is finally enabled again.

Turning VSync back on will fix the issue, but VSync causes the game to stutter between frames frequently for me, and prevent capture software (like Discord or OBS) from capturing the game window correctly without randomly inserting black frames.

To Reproduce

  1. Open S&box, and disable VSync in the settings menu. Save changes then close the client.
  2. Reopen S&box and visit a map that has a glass material somewhere on it. Visiting Construct in any game mode, or visit the main menu in the game "Nicked" will work.
  3. Observe brightly flashing colors on the glass.

Expected behavior

Glass and refractive materials should not flash random colors like this.

Media/Files

image image Log.log

I was told to use RenderDoc in the Discord when I was talking about my issue. I have no experience with this software but I managed to capture a frame while the issue is occurring, hope it helps! It's saved file size is over 2.2 GB, so I had to upload it externally to Google Drive. (I don't like Google Drive, but it's kind of my only option for bigger files like this.) https://drive.google.com/file/d/1_R8A8JK5g6zob4bptY6YFIYXnaEX1t_g/view?usp=sharing

Additional context

I am on Windows 11 23H2, with an AMD Radeon RX 6750 XT. This issue was observed after upgrading my graphics drivers to the latest version. I enforced a frame-rate limit via the Radeon software on s&box as alt-tabbing from the game window would unlock the frame-rate and cause my graphics card to heat up very quickly. I use s&box primarily in Borderless Full-screen mode, so I have not tested to see if Exclusive Full-screen would exhibit the same rendering problem.

Here's the hardware and driver details grabbed from my AMD Software.

CPU - AMD Ryzen 7 3700X 8-Core Processor - 8 Cores
RAM - 32 GB
GPU - AMD Radeon RX 6750 XT - Primary/Discrete
VRAM - 12272 MB - GDDR6 2250 MHz
Driver Version - 24.10.29.01-240714a-405203C-AMD-Software-Adrenalin-Edition
AMD Windows Driver Version - 32.0.11029.1008
Direct3D API Version - 12.2
Vulkan™ API Version - 1.3.280
OpenCL™ API Version - 2.0
OpenGL® API Version - 4.6
Direct3D® Driver Version - 9.17.11.0267
Vulkan™ Driver Version - 2.0.302
OpenCL® Driver Version - 32.0.11029.1008
OpenGL® Driver Version - 24.07.240303_ca9407b
2D Driver Version - 8.1.1.1634
UI Version - 2024.0715.0035.2026
AMD Audio Driver Version - 10.0.1.38
Driver Provider - Advanced Micro Devices, Inc.
Windows Edition - Windows 11 Professional (64 bit)
Windows Version - 23H2
Zyro1331 commented 1 month ago

Even more additional context after testing more. I am using driver default settings, it has nothing to do with the frame limiter I was applying beforehand. It doesn't matter if VSync is enabled or not, as changing the setting post-launch will temporarily fix the glass-related graphical issue until the game is closed and reopened. Exclusive or Borderless Full-screen doesn't seem to affect it either.

I could probably try and use DDU (Display Driver Uninstaller), to get absolutely fresh drivers installed in-case anything is corrupt. But my usual Radeon driver issues aren't occurring and no other games inhibit the same graphical behavior. I have not tried playing any other Source 2 titles specifically to see if these graphical problems occur there too.

I have noticed some other small graphical issues around, but they also happened with the older driver I was using beforehand. Shadows will randomly pop-in and out, and sometimes there will be this weird mosaic pattern when looking at surfaces at an angle. It's had to describe everything that happens with just words, so here's a video demonstrating those other issues:

https://github.com/user-attachments/assets/dcb5f8f2-6287-4d07-9151-3b96bba45f3f

Zyro1331 commented 1 month ago

A recent update has appeared to fix this, I am unsure what or how it was fixed. But upon forcing all my graphics settings in-game to be default, and then changing them accordingly to be inline with my system's performance, it has seemed to fix itself along with the other graphical artifacts I touched on.

handsomematt commented 1 month ago

@aylaylay got this one x