- Modified commit from @OrdinaryMagician #1261

- Always allow skyboxes by default
- Add option to disable skyboxes through mapinfo
Squashed commit of the following:

commit d4c4d9310d0157ce575f52989b5b080398cf7629
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:
Rachael Alexanderson 2020-12-30 11:08:43 -05:00
commit df4f41f4e8
11 changed files with 13 additions and 1 deletions

View file

@ -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--;
}

View file

@ -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
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

View file

@ -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: