<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelRenderContextLighting/makeImageBasedLightingFunction()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer29LowLevelRenderContextLightingP014makeImageBasedH8FunctionAA0dE16MaterialResourceC0hL0CyF"
  },
  "title" : "makeImageBasedLightingFunction()"
}
-->

# makeImageBasedLightingFunction()

Returns a lighting function using image-based lighting (IBL).

```
func makeImageBasedLightingFunction() -> sending LowLevelMaterialResource.LightingFunction
```

## Return Value

An image-based [`LowLevelMaterialResource.LightingFunction`](/documentation/RealityKit/LowLevelMaterialResource/LightingFunction).

## Discussion

The lighting function expects two cubemap textures bound via its corresponding
[`LowLevelArgumentTable`](/documentation/RealityKit/LowLevelArgumentTable): one for diffuse and one for specular. Prepare these
using [`ImageBasedLightTextureGenerator.generateDiffuse(using:fromSkyboxCube:quality:into:)`](https://developer.apple.com/documentation/realitykit/imagebasedlighttexturegenerator/generatediffuse(using:fromskyboxcube:quality:into:)) and
[`ImageBasedLightTextureGenerator.generateSpecular(using:fromSkyboxCube:quality:into:)`](https://developer.apple.com/documentation/realitykit/imagebasedlighttexturegenerator/generatespecular(using:fromskyboxcube:quality:into:)).

---

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)