[Fixed] [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby NightFright » Mon Nov 04, 2019 10:37 am

It appears that the iwad parameter is not working when used to prevent brightmaps from being applied to PWAD textures.

Example:
Using Brightmaps Plus
Using Sinful Discharge for Heretic

Screenshot from Sinful Discharge E3M9, showing SW2ON replacement with standard brightmaps applied in spite of iwad definitions:


SW2ON/SW2OFF definition (in brightmaps\textures\heretic.bm of Brightmaps Plus):
Code: Select allExpand view
brightmap texture sw2off
{
   map "brightmaps/textures/heretic/sw2off.png"
   iwad
}

brightmap texture sw2on
{
   map "brightmaps/textures/heretic/sw2on.png"
   iwad
}
User avatar
NightFright
Spotlight Team
 
Joined: 02 May 2008
Location: Germany

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby _mental_ » Tue Nov 05, 2019 3:34 am

Is there any reason why lump in build info is assigned after creating a multipatch texture?

Actually, there seems to be two related issues with these lump indices.
The first one is a source lump for multipatch texture is currently set to zero instead of -1. This condition will be always true for such textures.
The second one is the mentioned assignment. It's impossible to determine a WAD with the given texture without setting a source lump.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby Graf Zahl » Tue Nov 05, 2019 3:58 am

How would you determine which file a multipatch texture originates from?
There's several issues at play here:

1. Thanks to the non-cumulative nature of these things in vanilla and classic ports, most of them redefine the entire IWAD content. So what is to be considered the source lump here?
2. Even if the above does not trigger, you can just replace patches and the texture manager will never know.

In short, it is pretty much impossible to restrict brightmaps to composite IWAD textures. Something will always break. Of course the lump assignment here seems to be wrong. For a composite texture the definition lump should qualify as the source lump.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby _mental_ » Tue Nov 05, 2019 4:08 am

Exactly, my idea was to use definition lump as a source. So, it's about swapping these two lines.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby Graf Zahl » Tue Nov 05, 2019 6:24 am

Sure, that's how it was supposed to be, the swaparound was an accident.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Postby _mental_ » Tue Nov 05, 2019 7:52 am

Fixed in fd5e8d6.

As for source lump defaulting to zero instead of -1, the given fix doesn't depend on it. And I don't want to change this just in case.
_mental_
 
 
 
Joined: 07 Aug 2011


Return to Closed Bugs

Who is online

Users browsing this forum: Awario [RSS] and 0 guests