Visual Glitch - dyn lights, shadowmap, Doom Tournament

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Visual Glitch - dyn lights, shadowmap, Doom Tournament

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Mon Dec 24, 2018 2:54 pm

In another thread entirely drfrag wrote:Today dpJudas has pushed a fix for it.
I just tried the devbuild from the 24th (today) and the issue does indeed seem to be fixed. Thanks. :)

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Sun Oct 21, 2018 4:27 pm

I think the answer is "kind of". It looks like any situation that puts a dynamic light on exactly the same plane as a flat with a shadow map on it will cause this to happen. So your mod does it and maybe the light should be raised up a little but it can just as easily happen with regular mapping and dynamic lights if the various positions are right for it (like the test map above).

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Marisa the Magician » Sun Oct 21, 2018 4:22 pm

Heh, so it was my fault. The Damage Amp light has

Code: Select all

SetOrigin(target.pos,true);
in its Tick function. I must've forgotten to give it a Z offset.

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Sun Oct 21, 2018 3:39 pm

Yup, just been looking at the map setup and dynamic light myself. So, sort-of the same setup as with the Doom Tournament light being exactly on the floor. Perhaps my initial "it looks a bit like zfighting" might not be far off the mark? Could the shadowmap and dynamic light be doing something like zfighting with GZDoom trying to draw them on the same plane?

Anyway, in case it helps, I've made a similar setup and light definition to make it easy to find an area that displays the problem. With any luck, it should be visible to anyone trying to test it. Just load with Doom2. Nothing else needed.

[edit] Improved version showing the effect on the floor and the ceiling [/edit]

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by dpJudas » Sun Oct 21, 2018 3:18 pm

The glitch most likely happens when a dynamic light is placed in the same plane as the surface. In the second example you found the dynlight happens to be placed in exactly same plane as the ceiling.

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Sun Oct 21, 2018 2:26 pm

For what it's worth, I've found another place where this is easy to show. This time it's not with Doom Tournament and it's not on the floor either.

Mod: Hocus Doom viewtopic.php?f=19&t=45804

First map at location shown in the screenshots.



and how it looks in 3.5.1 (i.e. like it's meant to)

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Rachael » Fri Oct 19, 2018 2:27 pm

Nice find with the crates. Now even I am able to reproduce it.

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Marisa the Magician » Fri Oct 19, 2018 1:18 pm

Hm... maybe I screwed up the vertical offset of the light actor...

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by dpJudas » Fri Oct 19, 2018 11:41 am

Okay I know partly what is going on here. It only happens when you pick up the amp. I suspect the amp is perfectly aligned with the floor. When you jump the effect goes away until you land again.

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by dpJudas » Fri Oct 19, 2018 11:30 am

The glitch most likely started after I changed the shadow map code. What interests me is more why this mod and why only on your computer.

Edit: I'm able to reproduce this on my computer as well.

Re: Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Fri Oct 19, 2018 11:19 am

Update. The glitch does not seem to happen with a git build from 24th September. I'll see if I can track down the last git build that works.

[edit]
gzdoom-x64-g3.6pre-103-gd65d46226 from Oct 04 does not glitch (though it did crash the first time I tried to run it - but after that it was fine). All available git builds after this one glitch.

Visual Glitch - dyn lights, shadowmap, Doom Tournament

by Enjay » Fri Oct 19, 2018 11:07 am

Fault noticed with Doom Tournament: viewtopic.php?f=43&t=60759

GZDoom 3.6.0 official and a git build from the 17th.
Release version of the mod and the development version.
My drivers are current. GeForce 1080 with driver version 416.34 released 11 October.

I've found a GZDoom setting that changes this. If Light Shadowmaps is set to "yes" I get the problem. If it's set to "no" the problem goes away.

Running around in MAP09 of Doom2 after picking up an Unreal Damage powerup (which creates a pink glow around the player), I noticed that things sometimes could go a bit screwy if I looked at the floor.

Should look like:


But sometimes looked like:

It's almost as if the light is z-fighting with the floor.

It's even easier to show on Doom E2M2. Just grab an unreal damage powerup (there should be one where the berserk pack usually is) then climb up on to some crates.



I have also noticed that the light flickers more than it should even if the major glitchiness shown above has not become apparent (a video shows this).

Top