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

# init(scale:texture:)

Creates an object from a color or texture.

```
init(scale: Float = 1.0, texture: PhysicallyBasedMaterial.Texture? = nil)
```

## Parameters

`scale`

The reflectiveness value.

`texture`

An optional image texture.

## Discussion

In PBR rendering, the `metallic` property represents the
reflectiveness of an entity. This initializer creates a new object
from a single value to describe the reflectiveness of the entire
material. This initializer creates a new object from a single value
or a grayscale image texture, or from both.

If you specify `texture`, RealityKit calculates the `metallic` for
the entity by UV-mapping `texture` onto the entity and multiplying
the value of each mapped pixel by `scale`. If you don’t specify
`texture`, then RealityKit uses `scale` as the entire entity’s
reflectiveness. If you provide a color image for `texture` rather
than a grayscale image, RealityKit only uses the intensity of the
image’s red channel.

![An illustration showing two spheres rendered in RealityKit. The](images/com.apple.RealityKit/PhysicallyBasedMaterial-Metallic-swift-struct-init(scale:texture:)-1@2x.png)

---

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)