<!--
{
  "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/Roughness-swift.struct/init(floatLiteral:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation23PhysicallyBasedMaterialV9RoughnessV12floatLiteralAESf_tcfc"
  },
  "title" : "init(floatLiteral:)"
}
-->

# init(floatLiteral:)

Creates an object from a single value.

```
init(floatLiteral value: Float)
```

## Parameters

`value`

The roughness value.

## Discussion

The `roughness` property represents how much the surface of the
entity scatters light it reflects. A material with a high roughness
has a matte appearance, while one with a low roughness has a shiny
appearance.

![An illustration showing three spheres with different amounts of](images/com.apple.RealityKit/PhysicallyBasedMaterial-Roughness-swift-struct-init(floatLiteral:)-1@2x.png)

Use this initializer to create an object to specify the amount of
roughness using a single value that applies to the entire material.

---

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)