Screen Space Ambient Occlusion (SSAO): Difference between revisions
m (moved Ambient occlusion to Screen Space Ambient Occlusion (SSAO): Proper title due to article subject.) |
(Trimming article to more targeted information) |
||
Line 1: | Line 1: | ||
{{ | {{stub}} | ||
'''Ambient Occlusion (AO)''' is a type of [[lighting]] technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. AO can be rendered in real-time through '''[[Wikipedia:Screen Space Ambient Occlusion|Screen Space Ambient Occlusion (SSAO)]]''', a shading method which is able to closely simulate the effects of real AO with little loss of performance. | |||
'''Ambient Occlusion (AO)''' is a type of [[lighting]] technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. | |||
SSAO works by examining an onscreen pixel, and then comparing its location in the 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 Gaussian blurred to remove such grain. | SSAO works by examining an onscreen pixel, and then comparing its location in the 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 Gaussian blurred to remove such grain. | ||
Line 8: | Line 6: | ||
The depth buffer is measured from the camera, and as a result SSAO is viewing-angle dependent - the shading may look different depending on where the camera is located. This can be combated by rendering additional information outside of the current camera's bounds. | The depth buffer is measured from the camera, and as a result SSAO is viewing-angle dependent - the shading may look different depending on where the camera is located. This can be combated by rendering additional information outside of the current camera's bounds. | ||
=SSAO in the Source Engine= | == SSAO in the Source Engine == | ||
{{Note|For faked Ambient Occlusion per model within the Source Engine, see [[$ambientocclusion]].}} | {{Note|For faked Ambient Occlusion per model within the Source Engine, see [[$ambientocclusion]].}} | ||
{{TODO|Write a tutorial on how to increase the drawn depth in Source's depth buffer. SSAO will only work 128 units ahead unless this is done first.}} | {{TODO|Write a tutorial on how to increase the drawn depth in Source's depth buffer. SSAO will only work 128 units ahead unless this is done first.}} | ||
<br>{{TODO|Write a tutorial on creating an SSAO shader and implementing it into the engine. See [[Shader Authoring]].}} | <br>{{TODO|Write a tutorial on creating an SSAO shader and implementing it into the engine. See [[Shader Authoring]].}} | ||
Revision as of 12:56, 26 December 2010
Ambient Occlusion (AO) is a type of lighting technique applied in-game to create more realistic lighting. AO simulates soft shadows created by two surfaces that are close together. AO can be rendered in real-time through Screen Space Ambient Occlusion (SSAO), a shading method which is able to closely simulate the effects of real AO with little loss of performance.
SSAO works by examining an onscreen pixel, and then comparing its location in the 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 Gaussian blurred to remove such grain.
The depth buffer is measured from the camera, and as a result SSAO is viewing-angle dependent - the shading may look different depending on where the camera is located. This can be combated by rendering additional information outside of the current camera's bounds.
SSAO in the Source Engine
