protonscr

[Source Engine] Translucent sprites rendering issue

dxvkclosed nvidia proprietaryneeds feedbackd3d9not our bug
doitsujin/dxvk#4006 · opened 2024-05-17 by yurakone · updated 2025-07-05 · 10 comments · github
Yyurakone 2024-05-17 github

Hard edges on translucent sprites env_sprite with World Space Glow render mode (9) in Source engine games, also affects to env_lensflare in Black Mesa

Software information

Tested on Half-Life 2 Deathmatch, Black Mesa

System information\Tested on

  • GPU: NVIDIA GeForce RTX 3060 Ti \ NVIDIA GeForce GTX 1660 Ti
  • OS: Windows 10 / 11
  • Driver: NVIDIA 552.22.0
  • DXVK version: 32bit since 1.3.9 (earlier versions have not been tested) to 2.3.1

Apitrace file(s)

hl_trace

Log files

hl2_d3d9.log

Screenshots

Black Mesa sreenshots:
IMG_8029
IMG_8030
Half-Life 2 Deathmatch sreenshots:
IMG_8031
IMG_8032

BBlisto91 2024-05-17 github

Just checking out the apitrace it looks fine on my RX 7900xtx with both radv and amdvlk

KK0bin maintainer 2024-05-17 github

Image
I can reproduce it

KK0bin maintainer 2024-05-18 github

Internal note:
It's blending a texture that gets uploaded via a simple Lock,Copy,Unlock onto the render target. The blending is a simple add and output alpha of the fragment shader is 1.0 across the board.
The only thing that might be interesting is that both the RT as well as the texture are reinterpreted as SRGB. It's a BC1 texture with a SRGB view blended (with a fixed alpha) onto a SRGB B8G8R8A8 texture with a SRGB view.

It seems indeed related to SRGB. If I disable the SRGB views and manually transform it to 2.2 Gamma after sampling and at the end of the shader, it looks fine.

@WinterSnowfall has also confirmed that it renders correctly on Intel.

So... Nvidia driver bug?

Yyurakone 2024-05-18 github

I looked into the problem a little. I added alpha channel to the texture, cuz it was with no alpha DXT1 and created a new material then I tried different shader parameters
--Shader used: UnlitGeneric
--Shader parameters tested: $translucent 1 $additive 1
--Texture format: DXT5 Compressed texture
20240519015728_1
20240519015828_1
So... this looks like a problem with $additive 1 only, and maybe Nvidia drivers

BBlisto91 2024-05-20 github

This indeed is looking like a Nvidia driver bug. We've confirmed that it looks fine on AMD with the radv and amdvlk driver. On Intel it looks good with the Linux driver and on Nvidia it also looks fine on the NVK Linux driver while Nvidias own have the issue.

TTiagoquix 2024-06-24 github

Does hiding the NVIDIA GPU (report as AMD GPU) fix the bug?

BBlisto91 2024-06-24 github

No. A bug report needs to be made to Nvidia, which we haven't gotten to yet (I've volunteered now)

BBlisto91 2024-10-08 github

Forgot to update here that this have been reported to Nvidia and is being tracked as bug number 4762602

BBlisto91 2025-07-04 github

@yurakone Are you able to verify that this now seems fine with 576 on Windows or 575 on Linux?

Yyurakone 2025-07-05 github

Now it looks fine, 576 Windows
Image
Image

Nothing extracted yet.