---
title: enableSpecularOcclusion
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/physicallybasedmaterial/enablespecularocclusion
---

# enableSpecularOcclusion

Enables specular occlusion computations.

## Declaration

```swift
var enableSpecularOcclusion: Bool { get set }
```

## Discussion

Discussion When enabled, this property reduces specular highlights in areas that are occluded from ambient light, allowing for more realistic indirect lighting. This uses bent normal maps to modulate specular reflections based on ambient occlusion and roughness. Specular occlusion is particularly useful for character rendering and complex surfaces where traditional ambient occlusion alone may not provide sufficient detail for realistic specular lighting. note: This feature requires bent normal maps. Enable bent normals using bentNormal. material.enableSpecularOcclusion = boolean_value

## See Also

### Configuring occlusion shading

- [bentNormal](realitykit/physicallybasedmaterial/bentnormal-swift.property.md)
- [PhysicallyBasedMaterial.BentNormal](realitykit/physicallybasedmaterial/bentnormal-swift.struct.md)
