---
title: PhysicallyBasedMaterial.ClearcoatRoughness
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct
---

# PhysicallyBasedMaterial.ClearcoatRoughness

An object that defines the degree to which an entity’s clear, shiny coating scatters light to create soft highlights.

## Declaration

```swift
struct ClearcoatRoughness
```

## Overview

Overview This object specifies clearcoat roughness for entities that have clearcoat enabled. A clearcoat is a separate layer of transparent specular highlights used to simulate a clear coating, like on a car or the surface of lacquered objects. When you enable clearcoat rendering for a material, RealityKit renders the clearcoat as a separate layer just above the surface of the entity. You can specify a clearcoat roughness value to indicate how much the clearcoat scatters light that bounces off of it, which softens and spreads out the highlights.

## Topics

### Creating a clearcoat roughness object

- [init(floatLiteral:)](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/init(floatliteral:).md)
- [init(scale:texture:)](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/init(scale:texture:).md)
- [init(_:)](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/init(_:).md)

### Accessing clearcoat roughness values

- [texture](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/texture.md)
- [textureSemantic](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/texturesemantic.md)
- [scale](realitykit/physicallybasedmaterial/clearcoatroughness-swift.struct/scale.md)

## Relationships

### Conforms To

- [ExpressibleByFloatLiteral](swift/expressiblebyfloatliteral.md)

## See Also

### Realistic materials

- [Applying realistic material and lighting effects to entities](realitykit/applying-realistic-material-and-lighting-effects-to-entities.md)
- [Generating procedural textures](visionos/generating-procedural-textures-in-visionos.md)
- [PhysicallyBasedMaterial](realitykit/physicallybasedmaterial.md)
- [PhysicallyBasedMaterial.BaseColor](realitykit/physicallybasedmaterial/basecolor-swift.struct.md)
- [PhysicallyBasedMaterial.Roughness](realitykit/physicallybasedmaterial/roughness-swift.struct.md)
- [PhysicallyBasedMaterial.Metallic](realitykit/physicallybasedmaterial/metallic-swift.struct.md)
- [PhysicallyBasedMaterial.Normal](realitykit/physicallybasedmaterial/normal-swift.struct.md)
- [PhysicallyBasedMaterial.Blending](realitykit/physicallybasedmaterial/blending-swift.enum.md)
- [PhysicallyBasedMaterial.AmbientOcclusion](realitykit/physicallybasedmaterial/ambientocclusion-swift.struct.md)
- [PhysicallyBasedMaterial.Specular](realitykit/physicallybasedmaterial/specular-swift.struct.md)
- [PhysicallyBasedMaterial.SheenColor](realitykit/physicallybasedmaterial/sheencolor.md)
- [PhysicallyBasedMaterial.Clearcoat](realitykit/physicallybasedmaterial/clearcoat-swift.struct.md)
- [PhysicallyBasedMaterial.AnisotropyLevel](realitykit/physicallybasedmaterial/anisotropylevel-swift.struct.md)
- [PhysicallyBasedMaterial.AnisotropyAngle](realitykit/physicallybasedmaterial/anisotropyangle-swift.struct.md)
- [PhysicallyBasedMaterial.EmissiveColor](realitykit/physicallybasedmaterial/emissivecolor-swift.struct.md)
