Skip to content

Commit fa48bac

Browse files
authored
Updated Ambient-Occlusion.md
Removed general description from the intro to the doc and linked off to the Unity manual. Edited the rest of the doc for readability and styling.
1 parent 42d8917 commit fa48bac

File tree

1 file changed

+33
-36
lines changed

1 file changed

+33
-36
lines changed

Documentation~/Ambient-Occlusion.md

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,27 @@
11
# Ambient Occlusion
22

3-
The **Ambient Occlusion** post-processing effect approximates [Ambient Occlusion](http://en.wikipedia.org/wiki/Ambient_occlusion) in real time as a full-screen post-processing effect. It darkens creases, holes, intersections and surfaces that are close to each other. In real life, such areas tend to block out or occlude ambient light, hence they appear darker.
3+
The **Ambient Occlusion** post-processing effect darkens creases, holes, intersections and surfaces that are close to each other.
44

5-
Note that the **Ambient Occlusion** effect is quite expensive in terms of processing time and generally should only be used on desktop or console hardware. Its cost depends purely on screen resolution and the effects parameters and does not depend on scene complexity as true ambient occlusion would.
5+
For further information on the **Ambient Occlusion** effect, refer to the [Ambient Occlusion](https://docs.unity3d.com/Manual/PostProcessing-AmbientOcclusion.html) documentation in the Unity manual.
66

7-
8-
![](images/screenshot-ao.png)
9-
10-
11-
The effect comes with two modes:
7+
The **Ambient Occlusion** effect in this package has two modes:
128

139
- Scalable Ambient Obscurance
1410
- Multi-scale Volumetric Occlusion
1511

1612
## Scalable Ambient Obscurance
1713

18-
This is a standard implementation of ambient obscurance that works on non modern platforms. If you target a compute-enabled platform we recommend that you use the **Multi-scale Volumetric Occlusion** mode instead.
19-
14+
This is a standard implementation of ambient obscurance that works on older platforms. If you need to target a compute-enabled platform, use the **Multi-scale Volumetric Occlusion** mode instead.
2015

21-
![](images/ssao-1.png)
16+
### Performance
2217

18+
The **Scalable Ambient Obscurance** mode can be resource-intensive, especially when viewed very close to the Camera. To improve performance, use a low `Radius` setting, to sample pixels that are close and in clip space to the source pixel. This makes cacheing more efficent. Using a higher `Radius` setting generates samples further away from the source pixel and won’t benefit from caching, which slows down the effect.
2319

24-
### Properties
20+
Because of the Camera’s perspective, objects near the front plane use larger radiuses than those far away, so computing the ambient occlusion pass for an object close to the camera will be slower than for an object further away that only occupies a few pixels on screen.
2521

26-
| Property | Function |
27-
| :------------ | :------------------------------------------------------------ |
28-
| Intensity | Degree of darkness produced by the effect. |
29-
| Radius | Radius of sample points, which affects extent of darkened areas. |
30-
| Quality | Defines the number of sample points, which affects quality and performance. |
31-
| Color | Tint of the ambient occlusion. |
32-
| Ambient Only | Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. |
22+
Dropping the `Quality` setting down will improve performance too.
3323

34-
### Performances
35-
36-
Beware that this effect can be quite expensive, especially when viewed very close to the camera. For that reason it is recommended to favor a low `Radius` setting. With a low `Radius` the ambient occlusion effect will only sample pixels that are close, in clip space, to the source pixel, which is good for performance as they can be cached efficiently. With higher radiuses, the generated samples will be further away from the source pixel and won’t benefit from caching thus slowing down the effect. Because of the camera’s perspective, objects near the front plane will use larger radiuses than those far away, so computing the ambient occlusion pass for an object close to the camera will be slower than for an object further away that only occupies a few pixels on screen.
37-
38-
Dropping the `Quality` setting down will improve performances too.
39-
40-
Generally speaking, this effect should not be considered on mobile platforms and when running on consoles we recommend using the **Multi-scale Volumetric Occlusion** mode as it's much faster there and looks better in most cases.
24+
**Scalable Ambient Obsurance** should not be used on mobile platforms or consoles as the **Multi-scale Volumetric Occlusion** mode is faster and provides better graphics for these platforms.
4125

4226
### Requirements
4327

@@ -46,26 +30,39 @@ Generally speaking, this effect should not be considered on mobile platforms and
4630

4731
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
4832

49-
## Multi-scale Volumetric Occlusion
5033

51-
This is a more modern version of ambient occlusion heavily optimized for consoles and desktop platforms. It generally looks better and runs faster than the other mode on these platforms but requires compute shader support.
34+
![](images/ssao-1.png)
5235

5336

54-
![](images/ssao-2.png)
37+
### Properties
5538

39+
| Property | Function |
40+
| :------------ | :------------------------------------------------------------ |
41+
| Intensity | Adjust the degree of darkness **Ambient Occlusion** produces. |
42+
| Radius | Set the radius of sample points, which controls the extent of darkened areas. |
43+
| Quality | Define the number of sample points, which affects quality and performance. |
44+
| Color | Set the tint color of the ambient occlusion. |
45+
| Ambient Only | Enable this checkbox to make the **Ambient Occlusion** effect only affect ambient lighting. This option is only available with the Deferred rendering path and HDR rendering. |
5646

57-
### Properties
47+
## Multi-scale Volumetric Occlusion
5848

59-
| Property | Function |
60-
| :------------------ | :------------------------------------------------------------ |
61-
| Intensity | Degree of darkness produced by the effect. |
62-
| Thickness Modifier | Modifies the thickness of occluders. This increases dark areas but can potentially introduces dark halos around objects. |
63-
| Color | Tint of the ambient occlusion. |
64-
| Ambient Only | Enables the ambient-only mode in that the effect only affects ambient lighting. This mode is only available with the Deferred rendering path and HDR rendering. |
49+
This mode is optimized for consoles and desktop platforms. It has better graphics and runs faster than **Scalable Ambient Obscurance** on these platforms but requires [compute shader support](https://docs.unity3d.com/Manual/class-ComputeShader.html).
6550

6651
### Requirements
6752

6853
- Compute shader support
6954
- Shader model 4.5
7055

71-
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
56+
See the [Graphics Hardware Capabilities and Emulation](https://docs.unity3d.com/Manual/GraphicsEmulation.html) page for further details and a list of compliant hardware.
57+
58+
![](images/ssao-2.png)
59+
60+
61+
### Properties
62+
63+
| Property | Function |
64+
| :------------------ | :------------------------------------------------------------ |
65+
| Intensity | Adjust the degree of darkness **Ambient Occlusion** produces. |
66+
| Thickness Modifier | Modify the thickness of occluders. This increases dark areas but can introduce dark halos around objects. |
67+
| Color | Set the tint color of the ambient occlusion. |
68+
| Ambient Only | Enable this checkbox to make the **Ambient Occlusion** effect only affect ambient lighting. This option is only available with the Deferred rendering path and HDR rendering. |

0 commit comments

Comments
 (0)