Disabled Player Sprite causes Flickering Dynamic Lights

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: Disabled Player Sprite causes Flickering Dynamic Lights

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Thu Mar 14, 2019 6:54 am

Fixed in 087353f.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Graf Zahl » Thu Mar 14, 2019 5:59 am

Yes, I think you are correct here

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Thu Mar 14, 2019 5:26 am

I think I found the problem. If I got everything right, mLastMappedIndex must be invalidated in FLightBuffer::BindBase() function as well.
As it does glBindBufferBase() under the hood, offset in FLightBuffer::DoBindUBO() may point to a wrong uniform array element (without rebinding a proper range).

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Wed Mar 13, 2019 2:06 pm

It’s GL3 render path but it’s not platform or hardware specific. Just force usage of UBO instead of SSBO and the bug will appear.
I tried to compare good and bad frames in RenderDoc. Uniforms are quite different and hard to compare directly. Like I said, good frames have an extra call to glBindBufferRange.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Graf Zahl » Wed Mar 13, 2019 11:01 am

Does this only happen on Macs? Your analysis shows why I haven't seen thids yet: It seems to be part of the GL3 renderpath.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Wed Mar 13, 2019 10:23 am

While I still cannot comprehend what's exactly wrong with it, I managed to narrow it down to a particular case.
It happens when two consecutive calls to FLightBuffer::DoBindUBO() with different indices lead to the same offset.

For example, for the provided test it's enough to use index instead of offset in conjunction with mLastMappedIndex in the given function.
One extra call to glBindBufferRange() "fixes" the flickering. But it doesn't give a clue about the real cause of this bug.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Pixel Eater » Sun Mar 10, 2019 3:34 pm

Ran this one outside of a Slade sesh so it should be ok: Link

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Sun Mar 03, 2019 4:53 am

Saved games must exactly match the map to be able to load them. That's what I've got with the provided sample

Code: Select all

This savegame needs these wads:
sladetemp_run.wad

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Pixel Eater » Fri Feb 22, 2019 12:53 am

_mental_ wrote:All this info is mostly useless without a map. In this case, a saved game is necessary too.
I somehow managed to find another angle where it flashes darker instead so there are two saves included.
Still it's weird that it only happens when the sprite is hidden :shrug:

Google Drive

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by _mental_ » Fri Feb 22, 2019 12:11 am

All this info is mostly useless without a map. In this case, a saved game is necessary too.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Pixel Eater » Fri Feb 22, 2019 12:08 am

Okay thanks, I've added those into the first post :thumb:

Re: Disabled Player Sprite causes Flickering Dynamic Lights

by Rachael » Thu Feb 21, 2019 11:37 pm

Make sure to state your hardware and full information about the current version of your operating system. Posting your "About This Mac" screenshot should be sufficient for that purpose. A startup log from GZDoom may be helpful for diagnosing your system's specific OpenGL implementation, since Apple's tends to be kinda crappy. You can add "+logfile ~/Desktop/GZDoom-startup.txt" to GZDoom's command line options for this purpose.

Disabled Player Sprite causes Flickering Dynamic Lights

by Pixel Eater » Thu Feb 21, 2019 5:50 pm

When the player sprite is hidden, the player is at a perfect position/angle/pitch and there are flickering dynamic lights nearby then some walls will light up immensely.

It's hard to capture because it's so fast but I've managed to luck out:


These were from the same pause, nothing changes except the cvar.

And here is a video
Spoiler: Saving here in case it's relevant
Spoiler: My specs

Top