[Fixed] Disabled Player Sprite causes Flickering Dynamic Lights

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Disabled Player Sprite causes Flickering Dynamic Lights

Postby Pixel Eater » Thu Feb 21, 2019 6: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
Last edited by Pixel Eater on Fri Feb 22, 2019 1:06 am, edited 1 time in total.
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Rachael » Fri Feb 22, 2019 12:37 am

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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Pixel Eater » Fri Feb 22, 2019 1:08 am

Okay thanks, I've added those into the first post :thumb:
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Fri Feb 22, 2019 1:11 am

All this info is mostly useless without a map. In this case, a saved game is necessary too.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Pixel Eater » Fri Feb 22, 2019 1: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
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Sun Mar 03, 2019 5: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 allExpand view
This savegame needs these wads:
sladetemp_run.wad
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Pixel Eater » Sun Mar 10, 2019 4:34 pm

Ran this one outside of a Slade sesh so it should be ok: Link
User avatar
Pixel Eater
I sense evil I fear it here today, Like a bad dream that never goes away -MBerry
 
 
 
Joined: 02 Aug 2017
Location: In between the Moon and you, between the buried and me.

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Wed Mar 13, 2019 11: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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Graf Zahl » Wed Mar 13, 2019 12:01 pm

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.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Wed Mar 13, 2019 3: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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Thu Mar 14, 2019 6: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).
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby Graf Zahl » Thu Mar 14, 2019 6:59 am

Yes, I think you are correct here
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Disabled Player Sprite causes Flickering Dynamic Lights

Postby _mental_ » Thu Mar 14, 2019 7:54 am

Fixed in 087353f.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest