Blur sphere + Crossfade = render artifacts

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Blur sphere + Crossfade = render artifacts

Postby Player701 » Wed Nov 28, 2018 12:47 pm

This issue happens with a very specific setup which depends on user settings as well as the game state, so I'm attaching my INI here to help reproduce the bug. Note that there may be other cases where this issue can manifest itself, but it all seems to happen when the level is loading.

Testing procedure:
  1. Warp to any map.
  2. Type "IDBEHOLDI" to get the blur sphere powerup.
  3. Save the game.
  4. Load the save. If "Screen wipe style" is set to "Crossfade", a rendering artifact will appear on the screen while the crossfade is happening. For me, it appears in the bottom area of the screen and looks like a thin black column spanning about 1/3 of the screen height.
Screenshot:


Git bisect shows that the issue started happening in this commit.

System information: NVIDIA GTX 660, Windows 7 64-bit.
You do not have the required permissions to view the files attached to this post.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Blur sphere + Crossfade = render artifacts

Postby Graf Zahl » Wed Nov 28, 2018 1:04 pm

It also happens only with the 'Noise' fuzz style. Looks like a bug in that shader function.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Blur sphere + Crossfade = render artifacts

Postby Player701 » Sun Nov 22, 2020 8:14 am

Sorry for a two-year bump, just wanted to update this report with some new information.

  1. Still happens as of GZDoom 4.5.0 and development builds.
  2. The statement above saying that only the "Noise" fuzz style is affected is incorrect. "Swirly fuzz" and "Translucent fuzz" are affected as well.
  3. In addition to that, when fuzz style is set to "Swirly fuzz" or "Translucent fuzz", rendering artifacts in form of white vertical lines can be periodically observed even without loading a save file. Their appearance seems to be completely random. See screenshot below for details.



With all these glitches, it doesn't look like an error in the shader function to me, especially considering that there are multiple shader functions that are affected.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Sun Nov 22, 2020 11:00 am

I thought it was a driver bug and i didn't report that. Seems it's much worse, remember that the default gl_fuzztype is 0. LZDoom is also affected.
If i set gl_fuzztype to 4 for instance, summon a spectre and give myself the invisibility powerup i get glitches galore (lines and dots) as it walks around below me.
I get random glitches all the time while playing whenever i find a spectre.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Sun Nov 22, 2020 11:50 am

Seems this new report is a driver bug after all (or at least mine if it's not the same, i think i updated the AMD drivers recently), with this change the artifacts remain:
Code: Select allExpand view
diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp
index 21da5f678a..0a4e4c4a9e 100644
--- a/src/gl/renderer/gl_renderstate.cpp
+++ b/src/gl/renderer/gl_renderstate.cpp
@@ -183,7 +183,7 @@ bool FRenderState::ApplyShader()
    activeShader->muClipHeight.Set(mClipHeight);
    activeShader->muClipHeightDirection.Set(mClipHeightDirection);
    activeShader->muShadowmapFilter.Set(static_cast<int>(gl_shadowmap_filter));
-   activeShader->muTimer.Set((double)(screen->FrameTime - firstFrame) * (double)mShaderTimer / 1000.);
+   activeShader->muTimer.Set((double)(screen->FrameTime) * (double)mShaderTimer / 1000.);
    activeShader->muAlphaThreshold.Set(mAlphaThreshold);
    activeShader->muLightIndex.Set(mLightIndex);   // will always be -1 for now
    activeShader->muClipSplit.Set(mClipSplit);

@Player701: What's your graphics card? Do you see the artifacs i've mentioned?
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby Player701 » Sun Nov 22, 2020 12:57 pm

Hmm. Now that I've tested it on my laptop, the results are somewhat different, but only slightly. I have an RTX 2080 Ti on desktop and GTX 1050 Ti on laptop. I have updated the drivers to the latest version (as of now, that is 457.30). Tested with both Vulkan and OpenGL backends, there seem to be no difference between them (on the same machine, anyway).

Here's what I've found out:

  1. With gl_fuzztype set to either 3 (swirly fuzz) or 4 (translucent fuzz), the original glitch, as described in my first post from 2 years ago, only manifests with certain HUD weapon sprites - namely, the pistol, the super shotgun, and the chaingun. Other weapon sprites, as well as monster sprites, do not appear to be affected.
  2. With gl_fuzztype set to 6 (noise), the original glitch, as described in my first post from 2 years ago, still manifests with all HUD weapon sprites as well as monster sprites.
  3. With gl_fuzztype set to either 3 of 4, invisible monster sprites seem to display random white dots instead of white vertical lines. This behavior was reproduced both on my desktop PC and on my laptop. It appears, however, that the amount of dots is somewhat less on the laptop than on the desktop. Note that on both machines, GZDoom runs in the native Full HD (1920x1080) screen resolution.
  4. With gl_fuzztype set to either 3 of 4, weapon sprites display random white vertical lines, as described in my previous post, only on my desktop PC. I could not reproduce the vertical lines on my laptop.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Sun Nov 22, 2020 2:07 pm

Houston, we've got a problem. I've checked GZDoom 3.3.2 with a renamed LZDoom ini and it's not affected. The artifacts are very noticeable @1366x768. I backported some shader related stuff i think.
Edit: it's something recent, 4.1.3 was affected and 4.0.0 was not.
Edit2: the problem is not in the shaders themselves, it's something related to the timer. BTW the dots appear near the monsters.
Last edited by drfrag on Mon Nov 23, 2020 12:51 pm, edited 1 time in total.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Mon Nov 23, 2020 11:33 am

I don't know where the problem is, gzdoom-x64-g4.1pre-92-g5b6bae409 does not show the issue. It comes from the now deleted vulkan2 branch, it had several hundred commits and was active for several months. I could try to investigate it in the legacy branch as i saved the devbuilds in my hard drive, it's something i cherry-picked.
Edit: nope, they are not old enough. 3.8.1_legacy is not affected, 3.8.2_legacy is.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Mon Nov 23, 2020 12:49 pm

I've found it and without having to compile, it's fixed reverting this commit:
https://github.com/coelckers/gzdoom/com ... 96921a24e8
BTW now Travis-CI is paid, so i won't be pushing much for now.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby Graf Zahl » Mon Nov 23, 2020 1:26 pm

Again it is not that simple as a revert will also break the intent of that commit.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Mon Nov 23, 2020 2:34 pm

Of course, but is it actually that important? Before that commit was not in and HDR worked, i obviously don't have a HDR monitor and the issue is serious enough to revert the commit unless a better solution is provided. Someone with a HDR monitor could try to fix that enhancement.
I mean reverting the commit is only a possibility, the important part is that now we know where the problem is.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Blur sphere + Crossfade = render artifacts

Postby Rachael » Wed Nov 25, 2020 11:23 am

Yes, but the fact that you suggest reverting the commit as your first go-to is really just not something you should do. It should always be a last resort.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Blur sphere + Crossfade = render artifacts

Postby drfrag » Wed Nov 25, 2020 11:50 am

Yeah, i should have said they are gone reverting that commit bad choice of words. But then i thought in LZDoom gl_fuzztype is 6 by default and not many of its users have a HDR monitor. Also thought that it was only an enhancement for HDR not based on any recent previous commits else i wouldn't have picked it, HDR had been supported for a long time without that. I'm still waiting for a better solution anyway but for now the bug is gone in LZDoom.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest