SSAO discussion

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: SSAO discussion

Post by Nash »

Graf Zahl wrote:I believe it's absolutely necessary to implement some means to selectively exclude things from the SSAO pass.

One problem with excluding a sector skybox from the SSAO pass is - what if the mapper constructs actual geometry into the sector skybox? Like distant buildings and things like that. Would be weird to see those not have shadows...
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

The way it is implemented right now, if the main shader outputs 0 in the alpha channel then that will be excluded from SSAO. We just need to figure out which walls/floors/ceilings we should do that for.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: SSAO discussion

Post by Gez »

One-sided walls plus floor and ceiling in skybox sectors would perhaps be a safe assumption. Though perhaps there could be a special mechanism (a texture flag? or a line/sector flag?) to mark skybox textures since sector skyboxes have other issues than SSAO, issues that are IIRC automatically solved for GLDEFS skyboxes.

[spoiler]I'm referring to the visible vertical and horizontal lines here: IIRC it's caused by tiling the texture.
Image[/spoiler]
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

Actually I don't think you would want them on one-sided walls because that would could secrets behind a one sided wall. :) A line/sector flag or texture flag is probably the most flexible way. I'm not sure what is best here.
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: SSAO discussion

Post by Rachael »

I dunno but I think both would probably work. Line/sector flag is probably best if you choose only one, though. However, the biggest concern is that older maps would not be updated enough to handle it.

Maybe the best thing to do is to declare in a map definition that SSAO must be specifically enabled in order to use it, and then allow a possible user option to override it (through the console only)?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Re: SSAO discussion

Post by Nash »

Just a tiny update on my FPS drop situation, testing with vid_maxfps = 0 and vid_vsync = 0.

With ALL post processing turned off (even AA, which apparently drains hundreds of frames per second as I've only found out :O)

1) Looking away from portal and into the wall - 880 FPS
2) Looking into the portal - 350 FPS
3) Same as (2) but with only SSAO enabled: 70 FPS

Of course with more post processing enabled (my normal play settings are 8x AA, bloom and lens distortion), plus the SSAO, my FPS drops to 30 FPS (vsync on) or 40 FPS (vsync off)

Despite these numbers, under normal play circumstances (ie with normal Doom maps), my framerate stays at 60. It's only with this portal demo that I see all of these performance costs.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: SSAO discussion

Post by Graf Zahl »

Portals can cause really bad stalls, and SSAO is a relatively costly pass. Before finalizing a portal this all needs to be finished so such drops are to be expected.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: SSAO discussion

Post by Gez »

dpJudas wrote:Actually I don't think you would want them on one-sided walls because that would could secrets behind a one sided wall. :)
If you hide a secret in a skybox sector, you're really devious! :twisted:
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

If Romero could hide a secret in a secret, then surely I can hide one in a skybox. :D
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: SSAO discussion

Post by Edward-san »

How about the skybox secret in Jumpmaze 2 map40? :twisted:
AFADoomer
Posts: 43
Joined: Fri Sep 02, 2005 3:23

Re: SSAO discussion

Post by AFADoomer »

Possibly dumb question, but I don't remember seeing it discussed here after the very beginning of the thread...

Are sprites intentionally excluded from the SSAO pass? Translucent textures with solid patterns in them are handled fine, so I'm curious why sprites aren't handled similarly.

I only really noticed because I use a lot of wall sprites, and they are drawn after the SSAO is applied (they still show up full-color, with standard shading with gl_ssao_debug enabled).
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: SSAO discussion

Post by Graf Zahl »

Sprites are rendered without any depth information at all. This is to avoid z-fighting when they overlap.

For wall sprites with no translucency at all this was changed recently, but this change probably hasn't filtered down to the SSAO branch.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

Depends on where in the rendering step it renders those sprites with no translucency. In DrawScene it calls RenderScene, AmbientOccludeScene, and then RenderTranslucent.
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

Re: SSAO discussion

Post by Tormentor667 »

Tormentor667 wrote:
Spoiler:
Sorry for double-posting this, but I just wanted to ask again concerning the portal fixes and especially the bloom issue with very bright maps.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

About the skybox shadowing thing, there is a plan for how to deal with this, but nothing implemented yet.

For the bloom, the problem here is how it calculates camera exposure. I cheated and used the sector brightness level as the indicator instead of what pixels are on the screen. I can probably fix this by calculating the real exposure, but it won't make it into the upcoming release I'm afraid.
Locked

Return to “GZDoom”