Weird dymanic light on walls

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: Weird dymanic light on walls

Re: Weird dymanic light on walls

by _mental_ » Mon Dec 17, 2018 4:28 am

Fixed in fb71563.

Re: Weird dymanic light on walls

by Graf Zahl » Mon Dec 17, 2018 4:20 am

Yes, that should be fine. It looks like it is losing the binding each new frame somewhere else. Curse OpenGL's global state system where anything can stomp on everybody else's data and leave a mess behind.

Re: Weird dymanic light on walls

by _mental_ » Mon Dec 17, 2018 3:27 am

To fix the glitch it's enough to move assignment of FLightBuffer::mLastMappedIndex from constructor to FLightBuffer::Clear() function.
Is this solution correct for render path with shader storage buffer?

Re: Weird dymanic light on walls

by Enjay » Sun Dec 16, 2018 7:58 am

I don't see the error on my setup using default settings. However, if I use -glversion 3 I can't even get it to start.

Code: Select all

**** DIED WITH FATAL ERROR:
Unable to load shader parallax:
Init Shader 'parallax':
Fragment shader:
0(72) : error C1059: non constant expression in initialization

Linking:
Fragment info
-------------
0(72) : error C1059: non constant expression in initialization
(0) : error C2003: incompatible options for link
Dev build from 16 Dec.

No idea if that's related or not.

Re: Weird dymanic light on walls

by _mental_ » Sun Dec 16, 2018 7:22 am

I reproduced exactly the same issue on Windows 10 with NVIDIA OpenGL 4.5 using -glversion 3 switch added to the command line from OP.
It was VS2017 x64 Release build at cc52f89 with the default config except 640x480 windowed mode.

Re: Weird dymanic light on walls

by Graf Zahl » Sun Dec 16, 2018 2:10 am

This function must be called on systems not using shader storage, because the UBO window is only 64 kb, but the light buffer can be larger.
But I have to admit that this case hasn't been thoroughly tested because it's a legacy fallback and for modern hardware never becomes an issue.

Oh yeah, and welcome to the land of undefined language behavior. Don't you just love the C++ committee and their refusal to have a robustly defined language?

Re: Weird dymanic light on walls

by _mental_ » Sun Dec 16, 2018 2:03 am

I tested on macOS with Intel and NVIDIA graphics. Although, I don't think it's related to hardware at all.

With unsigned index, i.e. before compilation warning fix, FLightBuffer::DoBindUBO() is never called. This means no glitch.
Apparently, 2^32-1 is greater than -1. Probably, different compilers can handle such comparison differently.
With signed index the mentioned function is called several times per frame. The glitch is now visible.

That's why I was asking how this is suppose to work.

Re: Weird dymanic light on walls

by Graf Zahl » Sat Dec 15, 2018 5:30 pm

That location looks fine to me - with your fix active, no matter whether I use -glversion 3 or not.

What hardware/driver did this happen on?

Weird dymanic light on walls

by _mental_ » Sat Nov 17, 2018 8:51 am

It appeared that my attempt to fix compilation warnings (this line to be precise) revealed a problem with dynamic lights.
Here is a screenshot from The Crimson Deed.
Screenshot_TheCrimsonDeed_20181117_162803.jpg
To reproduce, use the following command line and rotate head to the left

Code: Select all

-iwad Crimson_Beta_V2.ipk3 +map vmp02 -nomonsters +warp 10 430
I would revert my change but still how does this condition suppose to work? Before the "fix" it seems to function purely by occasion.

Top