<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicallyBasedMaterial/specular-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV8specularAC8SpecularVvp"
  },
  "title" : "specular"
}
-->

# specular

The specular highlight applied to the entity.

```
var specular: PhysicallyBasedMaterial.Specular { get set }
```

## Discussion

In Physically Based Rendering (PBR), specular highlights primarily come
from the object’s [`roughness`](/documentation/RealityKit/PhysicallyBasedMaterial/roughness-swift.property)
value. RealityKit automatically renders materials that have a low
roughness value with specular highlights based on the environment
lighting and the shape of the entity. As a result, for most materials,
you won’t need to specify a `specular` value when using
[`PhysicallyBasedMaterial`](/documentation/RealityKit/PhysicallyBasedMaterial).

For some types of dielectric (nonmetallic) materials, like facet-cut
glass or gems, PBR algorithms don’t create bright enough specular
highlights using just roughness. To accurately simulate those types of
materials, use the [`specular`](/documentation/RealityKit/PhysicallyBasedMaterial/specular-swift.property)
property to specify additional specular for the entity.

The following example demonstrates how to specify specular using a
single value for the entire material:

```swift
material.specular = .init(floatLiteral: 0.8)
```

This example shows how to specify specular using a UV-mapped image
texture:

```swift
if let specularResource = try? TextureResource.load(named:"entity_specular") {
    let specularMap = MaterialParameters.Texture(specularResource)
    material.specular = .init(texture: specularMap)
}
```

---

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)