---
title: ambientOcclusion
framework: modelio
role: symbol
role_heading: Instance Property
path: modelio/mdlscatteringfunction/ambientocclusion
---

# ambientOcclusion

The attenuation of ambient light due to local geometry variations on a surface.

## Declaration

```swift
var ambientOcclusion: MDLMaterialProperty { get }
```

## Discussion

Discussion Ambient occlusion (AO) describes the accessibility of a point on a surface to the surrounding radiant environment and is typically used to attenuate ambient lighting. A renderer should not use AO data should to affect direct illumination. The default AO value is zero. Typically, you assign a texture (such as that created with the generateAmbientOcclusionTexture(withQuality:attenuationFactor:objectsToConsider:vertexAttributeNamed:materialPropertyNamed:) method of a mesh) to this material property to add shading based on the shape of the mesh.

## See Also

### Working with Shading Properties

- [baseColor](modelio/mdlscatteringfunction/basecolor.md)
- [emission](modelio/mdlscatteringfunction/emission.md)
- [specular](modelio/mdlscatteringfunction/specular.md)
- [materialIndexOfRefraction](modelio/mdlscatteringfunction/materialindexofrefraction.md)
- [interfaceIndexOfRefraction](modelio/mdlscatteringfunction/interfaceindexofrefraction.md)
- [normal](modelio/mdlscatteringfunction/normal.md)
- [ambientOcclusionScale](modelio/mdlscatteringfunction/ambientocclusionscale.md)
