<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EnvironmentResource/init(skybox:specular:diffuse:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation19EnvironmentResourceC6skybox8specular7diffuseAcA07TextureD0CSg_A2HtKcfc"
  },
  "title" : "init(skybox:specular:diffuse:)"
}
-->

# init(skybox:specular:diffuse:)

Creates an EnvironmentResource a skybox, specular and diffuse texture resources.

```
@MainActor convenience init(skybox skyboxTexture: TextureResource?, specular specularTexture: TextureResource, diffuse diffuseTexture: TextureResource) throws
```

## Parameters

`skyboxTexture`

a skybox texture to preserve. If nil, derives a low-resolution proxy from
other inputs for lower memory usage.

`specularTexture`

an image based light specular texture.

`diffuseTexture`

an image based light diffuse texture.

## Discussion> Note: `SkyboxGenerator` and `ImageBasedLightTextureGenerator` can generate
> required textures into a `LowLevelTexture`, itself wrapped as a `TextureResource`.

> Note: The skybox is not needed for image based lighting with `VirtualEnvironmentProbeComponent`
> and `ImageBasedLightComponent`.

---

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)