Garry's Mod

Garry's Mod

433 ratings
Screen Space Ambient Occlusion (SSAO shader)
3
2
4
3
3
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Movie, Scenic, Realism
File Size
Posted
Updated
48.214 KB
27 Mar @ 3:26pm
11 Jul @ 11:41am
13 Change Notes ( view )

Subscribe to download
Screen Space Ambient Occlusion (SSAO shader)

Description
This is Screen Space Ambient Occlusion (SSAO) shader. Porting from Source SDK.

Screen space ambient occlusion (SSAO) is a computer graphics technique for efficiently approximating the ambient occlusion effect in real time. It was developed by Vladimir Kajalin while working at Crytek and was used for the first time in 2007 by the video game Crysis, also developed by Crytek.

Convars:
pp_ssao - Enable/Disable screen space ambient occlusion.
pp_ssao_quality - 32 - very hight, 16 - hight, 8 - normal, 4 - low; (1-32).
pp_ssao_debug - Enable/Disable SSAO debug.
pp_ssao_contrast - SSAO contrast (0 - 5).
pp_ssao_radius - SSAO radius (1 - 32).
pp_ssao_bias - SSAO bias (0 - 2).
pp_ssao_bias_offset - SSAO radius offset (0 - 1).
pp_ssao_custom_depth - Custom depth buffer have more bits but have no alphatest support.
pp_ssao_znear - znear depth buffer (0.01 - 100).
pp_ssao_zfar - zfar depth buffer (0.1 - 1000).
pp_ssao_debug_fp - Show debug first pass SSAO.
pp_ssao_debug_dp - Show debug current Depth buffer.

NEW!
pp_ssao_translucent - translucent fix (1 - on, 0 - off)

Removed:
pp_ssao_luminfluence - SSAO luminfluence (0-10; 0 - disabled).

Credits:
Akabenko – porting shader from Source SDK to GMOD.
NotUnknownDude, Ethan – making custom Depth Buffer.

Thansk Goldermor for porting BTR-82.
Popular Discussions View All (4)
1
4 Jul @ 8:10am
This makes my modern warfare guns invisible.
𝕟𝕖𝕠
3
7 Jul @ 8:33am
Best Config?
Janiowy
2
4 Jul @ 11:12am
Looking for Recommended Presets
RED KNIGHT
120 Comments
Evgeny Akabenko  [author] 4 hours ago 
MW base update soon. (fixed compatibility with depth buffer).

As I said, the problem was not in SSAO, but in the way MW weapons work with the depth buffer. I looked at the code, found the problem, fixed it, and sent it to the MW base developer.

I say it again: there is no need to fix SSAO. I'm so fucking sick of it:steamfacepalm:
Evgeny Akabenko  [author] 21 hours ago 
I may seem rude, but due to its adaptation to MW weapons, the code may turn out to be a hack. It works as it should now. Without fps loss. Without deformities. As it should. It is not the best decision to insert hacks into SSAO for the sake of MW weapons. At least, it seems so to me.

We removed the second renderView, found a way to improve the gmod depth buffer. Titanic work was done, but the fact that the MW weapon is not written to the depth buffer is not a problem of the depth buffer.

There is an option to change the render hook for MW weapons, but why should I interfere with the work of the weapon base? If it works as intended by the author
Evgeny Akabenko  [author] 22 hours ago 
So I should do a check for MW weapons, then change the MW render hooks so that I don't have to re-download the MW addon? Understand these guns, and how they work, and why they aren't rendered to the depth buffer?

As far as I know, MW weapons are rendered manually to use GESTURE animations. Personally, I'm not a MW weapon developer. I don't know how to work with it, I have plenty of other tasks. Ask the MW developer to adapt his weapon to GMOD's depth buffer (not SSAO, but render.GetResolvedFullFrameDepth() - this is GMOD's depth buffer).
Evgeny Akabenko  [author] 22 hours ago 
Why should I add support for MW weapons if they are not written to the standard depth buffer? For what purpose?

If someone wants to do this, let them adapt MW for SSAO. I am not obliged to work on the MW base if it is not written to the depth buffer.
Evgeny Akabenko  [author] 22 hours ago 
This addon is not an addition to MW weapons
yoknowhat 20 Jul @ 12:26pm 
Thats a weird approach.... cause we all gotta prefer the mw pack over a hacky (decent but hacky) ssao implementation. A workaround could favour all parties but man.... you did everything right, right?
Evgeny Akabenko  [author] 19 Jul @ 3:25am 
So the MW base is special and requires a special solution to support it. But that's all my authority is. I'm not going to make a fix specifically for something.

:missing: My addon is not an addition to MW weapons, so I specifically adapted it to the MW base. :missing: I did everything right.
Firestorm 15 Jul @ 3:00am 
Even with that solution and typed that command in console, the weapon itself is still invisible
Evgeny Akabenko  [author] 15 Jul @ 1:02am 
Not works with MW base???? Yes! I have a solution!
USE IT: pp_ssao_translucent 1
:steammocking::steammocking::dustpan::csgoct::melon:
Firestorm 13 Jul @ 5:54am 
Still does not work with MW base