Novum / vkQuake

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

Transparent textures glitch? #124

Closed dezo2 closed 5 years ago

dezo2 commented 6 years ago

When using vkQuake with Arcane Dimensions mod, there are some glitches in transparent textures. They are visible while using the default "smooth" filtering method and they were also present in previous version. Is it some Vulkan specific thing? They are rendered OK in latest OpenGL Quakespasm. Picture was taken in the beginning of the AD 1.5 update hub, more of it is present in AD Sepulcher map.

vkquake_alpha_texture

dezo2 commented 6 years ago

Forgot to add some info: win7x64, nvidia GTX1080, latest drivers 388.31 with default settings, vkQuake with default settings, no AA, AF active.

Novum commented 6 years ago

This is very curious, I have no idea what's going on. It really doesn't show up like that in GL.

dezo2 commented 6 years ago

It may be as well a bug in Vulkan or some specific combination of filtering flags with respect to texture size. I can imagine that GL acquired some hacks for this over the years in GPU drivers.

Novum commented 6 years ago

@dezo2 unlikely that QuakeSpasm will hit any driver workarounds. It must be some specified difference in sampling between GL and Vulkan, but so far I can't find any documentation indicating that.

dezo2 commented 6 years ago

Its not a big deal, really. Using the pixelated look eliminates this problem anyway. I was just curious if someone else can see that or something is screwed up on my end. Thank you for the reply and all your work on this port.

cforfang commented 6 years ago

It must be some specified difference in sampling between GL and Vulkan, but so far I can't find any documentation indicating that.

GL_LINEAR and GL_NEAREST minification is at least different, but I don't know if that would cause this. Search for "Mapping of OpenGL to Vulkan filter modes" in the spec, which also describes a way to emulate it.

Novum commented 6 years ago

It's not the filter mode. It's an offset of the texture coordinates.

dezo2 commented 5 years ago

Recent versions seem to be OK, so I am closing this. Thanks.

Novum commented 5 years ago

This must be something NVIDIA fixed in their drivers, I didn't change anything. Good to know it's gone.