Open yurakone opened 1 month ago
Just checking out the apitrace it looks fine on my RX 7900xtx with both radv and amdvlk
I can reproduce it
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?
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
So... this looks like a problem with
$additive 1
only, and maybe Nvidia drivers
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.
Does hiding the NVIDIA GPU (report as AMD GPU) fix the bug?
No. A bug report needs to be made to Nvidia, which we haven't gotten to yet (I've volunteered now)
Hard edges on translucent sprites
env_sprite
withWorld Space Glow
render mode(9)
in Source engine games, also affects toenv_lensflare
in Black MesaSoftware information
Tested on Half-Life 2 Deathmatch, Black Mesa
System information\Tested on
Apitrace file(s)
hl_trace
Log files
hl2_d3d9.log
Screenshots
Black Mesa sreenshots:
Half-Life 2 Deathmatch sreenshots:
![IMG_8032](https://github.com/doitsujin/dxvk/assets/98318619/b1586324-f378-4d0c-9597-f2e1d1b43bf2)