---
title: clearcoat
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/physicallybasedmaterial/clearcoat-swift.property
---

# clearcoat

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

## Declaration

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

## Discussion

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 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: material.clearcoat = .init(floatLiteral: 0.8) And this example shows how to specify clearcoat using a UV-mapped image texture: if let clearcoatResource = try? TextureResource.load(named:"entity_clearcoat") {     let clearcoatMap = MaterialParameters.Texture(clearcoatResource)     material.clearcoat = .init(texture: clearcoatMap) }

## See Also

### Setting the core properties

- [baseColor](realitykit/physicallybasedmaterial/basecolor-swift.property.md)
- [roughness](realitykit/physicallybasedmaterial/roughness-swift.property.md)
- [metallic](realitykit/physicallybasedmaterial/metallic-swift.property.md)
- [normal](realitykit/physicallybasedmaterial/normal-swift.property.md)
- [ambientOcclusion](realitykit/physicallybasedmaterial/ambientocclusion-swift.property.md)
- [specular](realitykit/physicallybasedmaterial/specular-swift.property.md)
- [clearcoatRoughness](realitykit/physicallybasedmaterial/clearcoatroughness-swift.property.md)
- [clearcoatNormal](realitykit/physicallybasedmaterial/clearcoatnormal-swift.property.md)
