[Fixed] Attenuated Lights not working properly

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

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.

Attenuated Lights not working properly

Postby Major Cooke » Sat May 07, 2022 11:41 pm

Tested with this commit using OpenGL + Hardware Accelerated, attenuated lights aren't affecting map geometry anymore, but sprites are still lit up fine.

Toss this code into DoomPlayer's class.

Code: Select allExpand view
   override void PostBeginPlay()
   {
      Super.PostBeginPlay();
      A_AttachLight("dummy", DynamicLight.PulseLight, Color(255, 255, 255, 255), 128, 192,
                  DynamicLight.LF_ATTENUATE, (0, 32, 0), 1);
   }
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Graf Zahl » Sun May 08, 2022 1:20 am

Attenuated lights work fine - all the internal definitions are attenuated after all, so it must be related to your specific setup. Also, please post a runnable example. Hacking internal classes is not the way to demonstrate an issue.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Attenuated Lights not working properly

Postby Nash » Sun May 08, 2022 1:30 am

Works fine for me too. Actor-generated lights, GLDEFS-defined lights, ZScript-spawned lights; they're all working (yes, attenuated).
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 1:42 am

Quite a vexing problem this is. I cleaned my entire GZDoom build out.

I tested it with a fresh, brand new INI, and it still doesn't light terrain. It lights up sprites but not the map terrain.

Code: Select allExpand view
Class LightTest : Actor
{
   Default
   {
      +NOINTERACTION
      +NOBLOCKMAP
   }
   
   override void PostBeginPlay()
   {
      Super.PostBeginPlay();
      A_AttachLight("dummy", DynamicLight.PulseLight, Color(255, 255, 255, 255), 128, 192,
            DynamicLight.LF_ATTENUATE, (0, 32, 0), 1);
   }
   
   States
   {
   Spawn:
      TNT1 A -1;
      Stop;
   }
}


Again, fresh INI, but when summoning this, the light doesn't even work on sprites. All options are at default.

I'll try it again and report back if it succeeds or not.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 1:49 am

It didn't fix my issue unfortunately. Fresh INI, completely cleaned out GZDoom's compilation spick and span...

I'm running with RelWithDebInfo, x64 bit. Will try with Release mode and see if that changes anything...
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Rachael » Sun May 08, 2022 1:50 am

This sounds like a driver issue. First thing - whatever backend you are using, change it and use a different one and test it. Test Softpoly as a last resort.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 2:01 am

Rachael wrote:This sounds like a driver issue. First thing - whatever backend you are using, change it and use a different one and test it. Test Softpoly as a last resort.


It works in everything except OpenGL (regular, not ES).

And that's strange because when I went back to a prior build, it worked then and I haven't changed my drivers yet.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Nash » Sun May 08, 2022 2:05 am

As Graf has said, post runnable examples. Who knows, the problem may be from the map wad.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 2:07 am

I did already. And I tried it with a variety of maps just to be certain. But for now I'll update my drivers.

Major Cooke wrote:
Code: Select allExpand view
Class LightTest : Actor
{
   Default
   {
      +NOINTERACTION
      +NOBLOCKMAP
   }
   
   override void PostBeginPlay()
   {
      Super.PostBeginPlay();
      A_AttachLight("dummy", DynamicLight.PulseLight, Color(255, 255, 255, 255), 128, 192,
            DynamicLight.LF_ATTENUATE, (0, 32, 0), 1);
   }
   
   States
   {
   Spawn:
      TNT1 A -1;
      Stop;
   }
}


EDIT: One more note: the commit I was on before I updated to today's latest was this one. It worked then.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 2:29 am

Nothing changed unfortunately.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Attenuated Lights not working properly

Postby Rachael » Sun May 08, 2022 2:31 am

What is the GPU? And what are the specific drivers?

Also - try typing this and recompiling:
Code: Select allExpand view
git revert 679518f8e
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Attenuated Lights not working properly

Postby Rachael » Sun May 08, 2022 5:09 am

So the problem was found to be that specific commit, it has been reverted for now.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Attenuated Lights not working properly

Postby Major Cooke » Sun May 08, 2022 8:00 am

That did the trick. Thanks!
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests