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

# init(scale:texture:)

Creates an anisotropy level object using a single value or a
texture.

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

## Parameters

`scale`

The anisotropy level value for the entire material.

`texture`

The anisotropy level values as a UV-mapped image.

## Discussion

By default, PBR materials are isotropic; in other words, an entity
that uses [`PhysicallyBasedMaterial`](/documentation/RealityKit/PhysicallyBasedMaterial) reflects light uniformly in
all directions, mimicking the behavior of most real-world objects.
Some objects, including those with many small parallel striations
such as vinyl records, CDs, or straight hair, reflect light more in
some directions than others, resulting in stretched or oblong
specular highlights, as shown in the following figure.

![An illustration showing 11 metallic spheres in a horizontal row.](images/com.apple.RealityKit/PhysicallyBasedMaterial-AnisotropyLevel-swift-struct-init(scale:texture:)-1@2x.png)

Use this initializer to create an object to set the
[`anisotropyLevel`](/documentation/RealityKit/PhysicallyBasedMaterial/anisotropyLevel-swift.property) for a
material using either a single value for the entire material, or a
UV-mapped image. If you specify `texture`, RealityKit calculates the
anistotropy level 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 anisotropy level. If you provide a color image for
`texture` rather than a grayscale image, RealityKit only uses the
intensity of the image’s red channel.

---

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)