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

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

Not too surprised that it doesn't work with the status bar. It makes no attempt at trying to hit the 3D scene except for the full screen HUD at the moment. :)
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 »

Image

Made some comparison footage. I love SSAO already, even in its incomplete stage. I'm pretty sure I'm leaving it on as my default when it's fully ready in the engine. ;) Good work, as always, dpJudas!
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

I see you tried playing with the light math mode too. :D Ideally per material stuff would make it use less specular highlight on something like sand. Looks nice on the wall tho. Funny thing is the highlight reveals better the actual position of the dynamic light - in this case I think its near the ground of the vase and not slightly above where the fire is.

I'm not sure if you'll see the SSAO in an official release of gzdoom. I still don't have a (realistic) idea of how to split transparency rendering from the opaque parts when it comes to portals.
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 »

I really like what I see. Once the next version is released, which should be soon now (just waiting for feedback from _mental_ for GL 3 on Apple and some Linux users), I think we can do a bit more here, especially creating an actually usable depth buffer and define proper materials that can be assigned to textures.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

Glad you guys like it. :) The light part I don't see that many showstoppers for (besides the work involved defining materials). The SSAO pass is the tricky part.

I know a relatively simple way to fix the depth problem. It involves having main.fp output pixelpos.w in FragColor.a for opaque and then change the blend modes so that dest alpha is grabbed from FragColor.a on opaque stuff and not modified on transparent stuff. That will cause the scene texture to contain RGB + depth. Normal passes will read the RGB part, and the SSAO pass will grab the depth.

The problem is the transparent/sprite rendering. Right now the pass runs after the scene is rendered, which means the darkening is put on top of the scene. That adds the darkening on top of the sprites - even the player weapon. If we can find a solution to this part of the puzzle we have a winner.
AFADoomer
Posts: 43
Joined: Fri Sep 02, 2005 3:23

Re: SSAO discussion

Post by AFADoomer »

This is an awesome start... I loaded my Star Trek TC up with this and the effect is very nice.

One thing to note moving forward... If the weapon is a model, it looks like only the weapon is shaded, not the rest of the view (unless certain hudmessages are displaying, apparently, which makes no sense to me?)... If I switch to a sprite weapon, everything behaves as normal... This also happens in Enjay's Gene-Tech mod - the shadows only appear when the weapons are off-screen while being switched.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

You mean when the weapon is a 3D model? Then the SSAO pass should be affecting it. Does that look bad?

Edit: okay I think I get what you're saying. The SSAO effect disappears from the rest of the scene? That's probably another depth buffer clear (like skies and portals).
Last edited by dpJudas on Wed Aug 31, 2016 22:34, edited 1 time in total.
AFADoomer
Posts: 43
Joined: Fri Sep 02, 2005 3:23

Re: SSAO discussion

Post by AFADoomer »

dpJudas wrote:You mean when the weapon is a 3D model? Then the SSAO pass should be affecting it. Does that look bad?
Yes... The weapon itself looks fine, but the overlay is *only* affecting the weapon model, and not the rest of the screen (turning on the debug view gives a white screen with the shadow effect showing only over the weapon).

Unless this is just me, somehow...
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 »

The 3D weapon pass clears the depth buffer. This is needed so that the weapon does not clip into walls.

See gl_scene.cpp, line 665.
User avatar
Ozymandias81
Posts: 12
Joined: Fri Jan 16, 2015 21:08
Location: Olympus Mons, Mars

Re: SSAO discussion

Post by Ozymandias81 »

dpJudas wrote:Okay, here it is: https://github.com/dpjudas/zdoom/releases/tag/ssao1

Note that the pass has some outstanding issues that causes it to create some annoying shadows due to some bug in the shader itself. You can see how the SSAO part looks like using ssao_debug 1. The gaussian blur also needs to be depth aware.

Overall though, without a solution to the portal situation, the entire thing is more or less useless.
Hi dpJudas, while I am working on BoA is there any hope to get the 32bit version of this experimental build? I can't run it on my Win7 32bit sp1 Ultimate and I want to test something (no, I don't know how to compile builds though) :(

Thanks in advance and also AMAZING WORK RECENTLY WITH BLOOM AND TONEMAPS TOO! :D
...And all these new additions will make GZDoom an engine similar to Unreal Engine 4! :lol:
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: SSAO discussion

Post by Rachael »

Ozymandias81 wrote:...And all these new additions will make GZDoom an engine similar to Unreal Engine 4! :lol:
I highly doubt GZDoom will ever come close to that.

But I will agree it's getting some really nice modern features.
dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: SSAO discussion

Post by dpJudas »

You're welcome, Ozymandias81. It's been fun adding (well, maybe except the black screen issues :D).

I'll upload a build later today for you - just need to tie up some loose ends first in the code. I've managed to fix the SSAO shader, so now it looks much much better than before. The screenshots Nash showed hided the fact that the image was very unpleasant to look at when moving around, but NOW it looks ace live too!
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany
Contact:

Re: SSAO discussion

Post by Tormentor667 »

This is brilliant dpJudas, really, it was about time that someone starts to enhances GZDoom in these perspectives :)
User avatar
Ozymandias81
Posts: 12
Joined: Fri Jan 16, 2015 21:08
Location: Olympus Mons, Mars

Re: SSAO discussion

Post by Ozymandias81 »

Eruanna wrote: I highly doubt GZDoom will ever come close to that.
Ikr just kiddin' a bit :mrgreen:
Eruanna wrote: But I will agree it's getting some really nice modern features.
Totally agree with u 8)
dpJudas wrote:You're welcome, Ozymandias81. It's been fun adding (well, maybe except the black screen issues :D).

I'll upload a build later today for you - just need to tie up some loose ends first in the code. I've managed to fix the SSAO shader, so now it looks much much better than before. The screenshots Nash showed hided the fact that the image was very unpleasant to look at when moving around, but NOW it looks ace live too!
Thanks a lot dpJudas then! I am "watching & following" you on github since today, so I'll keep an eye on your releases from time to time :cheers:
ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: SSAO discussion

Post by ibm5155 »

My Ray cast simulator looks strange with the higher dynamic light settings :S
Spoiler:
but, that's ok, since it's a special case and can be "disabled"...
Also, why theres no sound under your build? I only hear midi sound but nothing else :S

EDIT:
I tested with my map and I saw this.
Image
and, the dynamic lights weren't showing under my map ( I belive it's because my mod has a modified main.vp/fp [used for a custom fog shader] inside of it but idk)...

Still, it's a great work :D

As a plus, here's a screenshot from the tomb raider 2 map using your new effects
Image
Locked

Return to “GZDoom”