<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/enableSpecularOcclusion",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV23enableSpecularOcclusionSbvp"
  },
  "title" : "enableSpecularOcclusion"
}
-->

# enableSpecularOcclusion

Enables specular occlusion computations.

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

## 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
> ``doc://com.apple.RealityKit/documentation/RealityKit/PhysicallyBasedMaterial/bentNormal-swift.property``.

```swift
material.enableSpecularOcclusion = boolean_value
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)