<!--
{
  "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/clearcoat-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV9clearcoatAC9ClearcoatVvp"
  },
  "title" : "clearcoat"
}
-->

# clearcoat

The transparent highlights that simulate a clear, shiny coating on an
entity.

```
var clearcoat: PhysicallyBasedMaterial.Clearcoat { get set }
```

## Discussion

An entity in RealityKit can display a clearcoat, which is a separate
layer of transparent specular highlights used to simulate a clear
transparent coating, like the paint on a car, or the surface of
lacquered objects. By default, materials don’t have clearcoat enabled.

Use this property to enable clearcoat rendering. Specifying any value
greater than `0.0` turns clearcoat rendering on. A value of `1.0`
indicates a full clearcoat. RealityKit treats values above `1.0` as if
they’re `1.0`.

You can specify [`clearcoat`](/documentation/RealityKit/PhysicallyBasedMaterial/clearcoat-swift.property)
using a single `Float` that applies to the entire material, or a
UV-mapped grayscale image to provide different values for different
parts of an entity.

The following example specifies `clearcoat` using a single value:

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

And this example shows how to specify `clearcoat` using a UV-mapped
image texture:

```swift
if let clearcoatResource = try? TextureResource.load(named:"entity_clearcoat") {
    let clearcoatMap = MaterialParameters.Texture(clearcoatResource)
    material.clearcoat = .init(texture: clearcoatMap)
}
```

---

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)