Some way for sector skies to avoid being affected by SSAO

Moderator: GZDoom Developers

Posts: 31
Joined: Sat Apr 02, 2016 9:05 am

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

Post by wrkq »

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 all

applySSAO = mCurrentPortal->AllowSSAO();
while the line in hw_portal.cpp be

Code: Select all

 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)?

Return to “Closed Feature Suggestions [GZDoom]”