[Can't fix] Specific textures flickering in Void & Rainbow

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Specific textures flickering in Void & Rainbow

Postby RiboNucleic Asshat » Sat Feb 16, 2019 4:15 am

Uncertain exactly what causes this. Certain textures with a custom shader applied to them are rendering very incorrectly in GZDoom 3.7.0 and up, but appear correct in 3.6.0.
This doesn't happen in any software renderer (since they don't use texture shaders...)

I've isolated the problem in a small test map (it's a bit shoddily put together but demonstrates the problem just fine)

Here's how the glitch looks, in 3.7.2:



Here's how it should look, in 3.6.0:


I am using an NVIDIA GPU on Windows 10. No other files are loaded besides those that come with gzdoom.

Here is the minimal test map:
test.pk3
(54.1 KiB) Downloaded 6 times


I tried looking to see if this had already been reported, but none of the existing reports seemed to describe the same problem and didn't show any issues when I tested them.
User avatar
RiboNucleic Asshat
I'm gay in every way
 
Joined: 09 May 2013
Location: Exactly where I am
Discord: Ribonucleic Asshat#7687
Twitch ID: ribonucleicasshat
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Specific textures flickering in Void & Rainbow

Postby phantombeta » Sat Feb 16, 2019 8:15 am

This seems to have something to do with the usage of "uObjectColor2" in the shader. Removing the "if" statement and leaving only "texelTest *= uObjectColor;" makes it work perfectly fine.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit

Re: Specific textures flickering in Void & Rainbow

Postby Graf Zahl » Sat Feb 16, 2019 8:41 am

The problem actually looks to be glowdist.z.

No glow, no glowdist.z!
The code had to be changed a bit to implement Doom 64 lighting and what was glowdist is now two variables, i.e. glowdist and gradientdist, so that both features can be combined. This 'mix' instruction should use the newly added gradientdist which gets calculated for use with objectColor2.

Sorry, but this falls under 'can't fix'. It'd break a more recent engine feature if this was reverted. That's the risk you take when using undocumented features from the shader. In fact I can almost guarantee that this code won't survive the next refactoring of the shader anyway because the internal organization of these variables will change quite drastically, and possibly break lots of mods that poke around too deeply in engine internals.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Specific textures flickering in Void & Rainbow

Postby RiboNucleic Asshat » Sat Feb 16, 2019 8:47 am

Well, phantombeta's post prompted me to do more digging and I came to that exact conclusion. It causes issues no matter what 2 values are interpolated between. Is glowdist initialized to zeroes or is it never assigned?
User avatar
RiboNucleic Asshat
I'm gay in every way
 
Joined: 09 May 2013
Location: Exactly where I am
Discord: Ribonucleic Asshat#7687
Twitch ID: ribonucleicasshat
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Specific textures flickering in Void & Rainbow

Postby Graf Zahl » Sat Feb 16, 2019 11:07 am

If there are no glows it never gets assigned.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests