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.
User avatar
Major Cooke
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Attenuated Lights not working properly

Post by Major Cooke »

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 all

	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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48536
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Attenuated Lights not working properly

Post by Graf Zahl »

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
Nash
 
 
Posts: 17346
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Attenuated Lights not working properly

Post by Nash »

Works fine for me too. Actor-generated lights, GLDEFS-defined lights, ZScript-spawned lights; they're all working (yes, attenuated).
User avatar
Major Cooke
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

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 all

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
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

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
Rachael
Admin
Posts: 13208
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Attenuated Lights not working properly

Post by Rachael »

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
Major Cooke
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

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
Nash
 
 
Posts: 17346
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Attenuated Lights not working properly

Post by Nash »

As Graf has said, post runnable examples. Who knows, the problem may be from the map wad.
User avatar
Major Cooke
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

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 all

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
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

Nothing changed unfortunately.
User avatar
Rachael
Admin
Posts: 13208
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Attenuated Lights not working properly

Post by Rachael »

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

Also - try typing this and recompiling:

Code: Select all

git revert 679518f8e
User avatar
Rachael
Admin
Posts: 13208
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Attenuated Lights not working properly

Post by Rachael »

So the problem was found to be that specific commit, it has been reverted for now.
User avatar
Major Cooke
Posts: 8109
Joined: Sun Jan 28, 2007 3:55 pm

Re: Attenuated Lights not working properly

Post by Major Cooke »

That did the trick. Thanks!

Return to “Closed Bugs [GZDoom]”