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...
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.
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. [/spoiler]
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.
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)?
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.
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.
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).
Depends on where in the rendering step it renders those sprites with no translucency. In DrawScene it calls RenderScene, AmbientOccludeScene, and then RenderTranslucent.
It is getting better and better, but I still have issues with skybox sectgors:
Another thing I noticed: Sound isn't working anymore with the SSAO builds.
Beyond in snowy bright maps I find the bloom effect not really usable. Can it be somehow altered that if the majority of the screen is very bright, the bloom effect gets lowered so the surrounding areas are visible again and not overblindingly bright?
Bloom on
Bloom off
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.
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.