Screen Space Ambient Occlusion (SSAO): Difference between revisions
No edit summary |
No edit summary |
||
(85 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{stub}} | ||
{{Todo|Document about HBAO, alternative to SSAO which can be forced through GPU driver control panel (or NVIDIA Profile Inspector).}} | |||
[[File:AmbientOcclusionExample.jpg|right|210px|thumb|An example of traditional ''prerendered'' ambient occlusion in Blender 3D. SSAO attempts to mimic this look in real-time.]] | |||
{{note | Not to be confused with baked ambient occlusion on models!}} | |||
{{TODO|Expand the article to include different methods of SSAO. The method described is one of many.}}<br> | |||
SSAO | '''Screen Space Ambient Occlusion''' ('''SSAO''') works by examining an onscreen pixel, and then comparing its location in a [[depth buffer]] to the pixels around it. Pixels which are close together but not coplanar (on the same face) are shaded to simulate soft shadows. To maintain playable framerates, it is not possible to sample every pixel every frame, so random sampling is used, which will inevitably create noise/grain which may be more noticeable with movement. To counter this, the SSAO pass is often blurred to remove such grain. | ||
[[ | |||
As with traditional AO, SSAO is completely independent of the normal lighting system. This means that both the performance and appearance of the shader are unaffected by the lights used in a level. | |||
The depth buffer is measured from the camera, and so SSAO is view-dependent - the size and locations of the "shadows" created by SSAO may change as the player moves the camera around. Additionally, the shading may look different along the edges of the screen - this can be combated by rendering additional information outside of the current camera's bounds. | |||
== | |||
[[{{ | ==Source Filmmaker== | ||
[[Source Filmmaker]] includes an SSAO option (labelled "Ambient Occlusion"), accessible by right-clicking on the viewport. The default setting is very grainy. {{todo|Adjust number of samples?}} | |||
-- | |||
== SSAO in the Source Engine == | |||
* The original release of {{dota2|4}} aswell as {{sfm|1}}, and all games on {{titanfall|4}} branch are the only {{src|4}} games and software that support SSAO. | |||
* However, as SSAO is a post-processing effect, you can use third-party software (ReShade), or [[Source Shader Editor]] to add SSAO. Alternatively, it is possible to use the superior HBAO ambient occlusion, which can be forced through GPU driver control panel (or by using NVIDIA Profile Inspector). | |||
{{Note|For baked Ambient Occlusion maps per model within the Source Engine, see [[$ambientocclusion]].}} | |||
{{Note|A post process SSAO shader currently ships with the [[Source_shader_editor| Source Shader Editor]].}} | |||
{{TODO|Write a tutorial on creating an SSAO shader and implementing it into the engine. See [[Shader Authoring]].}} | |||
{{Note|I am currently writing a tutorial on implementing SSAO into Source Engine [http://www.moddb.com/games/lost-squad/tutorials/source-engine-implementing-simple-ssao-shader-part-1 here] (DmitRex).}} | |||
==External links== | |||
*[[Wikipedia:Ambient occlusion]] | |||
*[[Wikipedia:Screen Space Ambient Occlusion]] |
Latest revision as of 21:47, 8 February 2025

Screen Space Ambient Occlusion (SSAO) works by examining an onscreen pixel, and then comparing its location in a depth buffer to the pixels around it. Pixels which are close together but not coplanar (on the same face) are shaded to simulate soft shadows. To maintain playable framerates, it is not possible to sample every pixel every frame, so random sampling is used, which will inevitably create noise/grain which may be more noticeable with movement. To counter this, the SSAO pass is often blurred to remove such grain.
As with traditional AO, SSAO is completely independent of the normal lighting system. This means that both the performance and appearance of the shader are unaffected by the lights used in a level.
The depth buffer is measured from the camera, and so SSAO is view-dependent - the size and locations of the "shadows" created by SSAO may change as the player moves the camera around. Additionally, the shading may look different along the edges of the screen - this can be combated by rendering additional information outside of the current camera's bounds.
Source Filmmaker
Source Filmmaker includes an SSAO option (labelled "Ambient Occlusion"), accessible by right-clicking on the viewport. The default setting is very grainy.
SSAO in the Source Engine
- The original release of
Dota 2 aswell as Source Filmmaker, and all games on
Titanfall branch are the only
Source games and software that support SSAO.
- However, as SSAO is a post-processing effect, you can use third-party software (ReShade), or Source Shader Editor to add SSAO. Alternatively, it is possible to use the superior HBAO ambient occlusion, which can be forced through GPU driver control panel (or by using NVIDIA Profile Inspector).


