---
title: CustomMaterial.Roughness
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/custommaterial/roughness-swift.struct
---

# CustomMaterial.Roughness

An object that defines how the surface of an entity scatters the light it reflects.

## Declaration

```swift
struct Roughness
```

## Overview

Overview In physically based rendering, the roughness property represents how much the surface of an entity scatters the light it reflects. A material with a high roughness has a matte appearance, whereas one with a low roughness has a shiny appearance. For more information on using roughness values in a custom material, see roughness.

## Topics

### Creating a roughness object

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

### Accessing roughness values

- [scale](realitykit/custommaterial/roughness-swift.struct/scale.md)
- [texture](realitykit/custommaterial/roughness-swift.struct/texture.md)

## Relationships

### Conforms To

- [ExpressibleByFloatLiteral](swift/expressiblebyfloatliteral.md)

## See Also

### Custom material types

- [CustomMaterial.Custom](realitykit/custommaterial/custom-swift.struct.md)
- [CustomMaterial.CustomMaterialTexture](realitykit/custommaterial/custommaterialtexture.md)
- [CustomMaterial.LightingModel](realitykit/custommaterial/lightingmodel-swift.enum.md)
- [CustomMaterial.BaseColor](realitykit/custommaterial/basecolor-swift.struct.md)
- [CustomMaterial.Metallic](realitykit/custommaterial/metallic-swift.struct.md)
- [CustomMaterial.Normal](realitykit/custommaterial/normal-swift.struct.md)
- [CustomMaterial.EmissiveColor](realitykit/custommaterial/emissivecolor-swift.struct.md)
- [CustomMaterial.Blending](realitykit/custommaterial/blending-swift.enum.md)
- [CustomMaterial.Opacity](realitykit/custommaterial/opacity.md)
- [CustomMaterial.AmbientOcclusion](realitykit/custommaterial/ambientocclusion-swift.struct.md)
- [CustomMaterial.Specular](realitykit/custommaterial/specular-swift.struct.md)
- [CustomMaterial.Clearcoat](realitykit/custommaterial/clearcoat-swift.struct.md)
- [CustomMaterial.ClearcoatNormal](realitykit/custommaterial/clearcoatnormal-swift.struct.md)
- [CustomMaterial.ResourceStorage](realitykit/custommaterial/resourcestorage.md)
- [CustomMaterial.TextureCoordinateTransform](realitykit/custommaterial/texturecoordinatetransform-swift.typealias.md)
