mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 01:31:25 +00:00
- Modified commit from @OrdinaryMagician #1261
- Always allow skyboxes by default
- Add option to disable skyboxes through mapinfo
Squashed commit of the following:
commit d4c4d9310d
Author: Marisa Kirisame <marisa@sayachan.org>
Date: Wed Dec 30 09:58:39 2020 +0100
Disable AO for skybox portals (can be forced back with MAPINFO flag).
This commit is contained in:
parent
c59c2431ea
commit
df4f41f4e8
11 changed files with 13 additions and 1 deletions
|
@ -1653,6 +1653,8 @@ MapFlagHandlers[] =
|
|||
{ "nocoloredspritelighting", MITYPE_SETFLAG3, LEVEL3_NOCOLOREDSPRITELIGHTING, 0 },
|
||||
{ "forceworldpanning", MITYPE_SETFLAG3, LEVEL3_FORCEWORLDPANNING, 0 },
|
||||
{ "propermonsterfallingdamage", MITYPE_SETFLAG3, LEVEL3_PROPERMONSTERFALLINGDAMAGE, 0 },
|
||||
{ "enableskyboxao", MITYPE_SETFLAG3, LEVEL3_SKYBOXAO, 0 },
|
||||
{ "disableskyboxao", MITYPE_CLRFLAG3, LEVEL3_SKYBOXAO, 0 },
|
||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
||||
|
|
|
@ -251,6 +251,7 @@ enum ELevelFlags : unsigned int
|
|||
LEVEL3_FORCEWORLDPANNING = 0x00000080, // Forces the world panning flag for all textures, even those without it explicitly set.
|
||||
LEVEL3_HIDEAUTHORNAME = 0x00000100,
|
||||
LEVEL3_PROPERMONSTERFALLINGDAMAGE = 0x00000200, // Properly apply falling damage to the monsters
|
||||
LEVEL3_SKYBOXAO = 0x00000400, // Apply SSAO to sector skies
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -672,7 +672,7 @@ void HWDrawInfo::DrawScene(int drawmode)
|
|||
}
|
||||
else if (drawmode == DM_PORTAL && ssao_portals_available > 0)
|
||||
{
|
||||
applySSAO = true;
|
||||
applySSAO = (mCurrentPortal->AllowSSAO() || Level->flags3&LEVEL3_SKYBOXAO);
|
||||
ssao_portals_available--;
|
||||
}
|
||||
|
||||
|
|
|
@ -718,6 +718,7 @@ void HWSkyboxPortal::Shutdown(HWDrawInfo *di, FRenderState &rstate)
|
|||
}
|
||||
|
||||
const char *HWSkyboxPortal::GetName() { return "Skybox"; }
|
||||
bool HWSkyboxPortal::AllowSSAO() { return false; } // [MK] sector skyboxes don't allow SSAO by default
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
virtual line_t *ClipLine() { return nullptr; }
|
||||
virtual void * GetSource() const = 0; // GetSource MUST be implemented!
|
||||
virtual const char *GetName() = 0;
|
||||
virtual bool AllowSSAO() { return true; }
|
||||
virtual bool IsSky() { return false; }
|
||||
virtual bool NeedCap() { return true; }
|
||||
virtual bool NeedDepthBuffer() { return true; }
|
||||
|
@ -258,6 +259,7 @@ protected:
|
|||
virtual void * GetSource() const { return portal; }
|
||||
virtual bool IsSky() { return true; }
|
||||
virtual const char *GetName();
|
||||
virtual bool AllowSSAO() override;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ gameinfo
|
|||
messageboxclass = "MessageBoxMenu"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -77,6 +77,7 @@ gameinfo
|
|||
messageboxclass = "MessageBoxMenu"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
spawnnums
|
||||
|
|
|
@ -75,6 +75,7 @@ gameinfo
|
|||
messageboxclass = "MessageBoxMenu"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -73,6 +73,7 @@ gameinfo
|
|||
messageboxclass = "MessageBoxMenu"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -61,6 +61,7 @@ gameinfo
|
|||
statscreen_contentfont = "*BigFont"
|
||||
statscreen_authorFont = "*SmallFont"
|
||||
messageboxclass = "MessageBoxMenu"
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
|
@ -75,6 +75,7 @@ gameinfo
|
|||
messageboxclass = "MessageBoxMenu"
|
||||
normforwardmove = 0x19, 0x32
|
||||
normsidemove = 0x18, 0x28
|
||||
enableskyboxao
|
||||
}
|
||||
|
||||
DoomEdNums
|
||||
|
|
Loading…
Reference in a new issue