[Added] Fog after after palette emulation

Moderator: Raze Developers

Fog after after palette emulation

Postby markanini » Thu Oct 08, 2020 12:47 am

Currently Raze appears to apply fog before palette emulation. Applying it after instead would in theory improve banding, while at the same time keep the original color appearance that's lost in true color mode.
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Thu Oct 08, 2020 1:27 am

Fog is part of the shade table, so there is no separate step that could be done. The entire process is identical to what Hexen did with its swamp level.

I cross-checked with VoidSW - what it does is apply two layers of fog - the one baked into the shade table and regular hardware fog on top of it. But that's no longer "palette emulation".
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Thu Oct 08, 2020 5:06 am

That raises the question, how is fog handled in truecolor mode?
Maybe my idea could be better described as: applying palette emulation to sprites and tiles only.
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Thu Oct 08, 2020 5:24 am

In true color mode the shade tables are not used. Instead the defined fog color for the table gets used to create real fog.
Thinking about it, if you use a foggy shade table and want hardware fog it's just like taking shade 0 for everything and applying real fog to it, which is essentially the same as true color mode, just without texture filtering. That should be doable with reasonable effort.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Thu Oct 08, 2020 3:56 pm

That sounds good.
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Sat Apr 17, 2021 4:06 pm

Palette emulated fog has been removed some time ago because there's no way to make it work right, even palette emulated mode uses true color fog now.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Sat Apr 17, 2021 10:34 pm

Are you referring to the Palette postprocessing or the Polymost Palette emulation?
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Sat Apr 17, 2021 11:56 pm

Emulation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Sun Apr 18, 2021 12:00 am

I'm seeing some stepped fog. Does this mean the palette is applied on top of the parametric tables?
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Sun Apr 18, 2021 12:31 am

No, currently foggy sectors do not use any palette emulation. The reason is that if we want real fog we cannot use the light fading that's baked into the palette.
Keep in mind that palette emulation has absolutely no effecti if a sector is being rendered fullbright - but fog needs to be applied on fullbright colors.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Sun Apr 18, 2021 2:21 am

Is it not trivial to separate the palettes effect on the light fading, perhaps by making it part of the fog instead?
markanini
 
Joined: 18 Jan 2020

Re: Fog after after palette emulation

Postby Graf Zahl » Sun Apr 18, 2021 2:30 am

They are totally inseparable. The fog is baked into the lookup tables as light diminishing. Foggy sectors therefore have no fade to black effect at all, they only have fade to fog color effect instead.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fog after after palette emulation

Postby markanini » Sun Apr 18, 2021 3:13 am

Is sounded messy to me in my head, but now I know for sure. I'll still provide some alternate postprocessing LUTs when you are ready, similar to Pixel Eaters Troo Cullers mod.
markanini
 
Joined: 18 Jan 2020


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests