[Added] Some way for sector skies to avoid being affected by SSAO

Moderator: GZDoom Developers

Re: Some way for sector skies to avoid being affected by SSA

Postby wrkq » Wed Dec 30, 2020 11:16 pm

Ah heck. Way too late to comment, I know.

But I think it would be better from encapsulation perspective if the line in hw_drawinfo.cpp would be
Code: Select allExpand view
applySSAO = mCurrentPortal->AllowSSAO();

while the line in hw_portal.cpp be
Code: Select allExpand view
 bool HWSkyboxPortal::AllowSSAO() { return !!(Level->flags3 & LEVEL3_SKYBOXAO); } // [MK] sector skyboxes don't allow SSAO by default


Right now you made the global "all portals" code check for "AllowSSAO()" from any portal subclass, but if it says no, you decide to ignore that if the skybox flag is on.

It would "feel more right" if the skybox subclass specifically returned true/false in response to the flag, and the main render code let each subclass decide for itself.
Would be future-proof for hypothetical other portal subclass which might want to control SSAO in response to a different flag or whatever other reason.

That said I'm not sure if Level is accessible in the latter file (or can be made accessible without problems)?
wrkq
 
Joined: 02 Apr 2016

Previous

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest