<!--
{
  "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/SpotLightComponent/ProjectiveTexture",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18SpotLightComponentV17ProjectiveTextureV"
  },
  "title" : "SpotLightComponent.ProjectiveTexture"
}
-->

# SpotLightComponent.ProjectiveTexture

A component that specifies a map of a projective texture or cookie light to use for shadow mapping.

```
struct ProjectiveTexture
```

## Overview

Cookie lights or projective lights in RealityKit are essentially a light mask added to our SpotLights that allows us to create a shadow
that can illuminate an area uniformly by modifying the characteristics of the light.
To illustrate the concept, we can think of a piece of gelatin paper wrapped around a light. The final illumination of the objects lit by this light
will be a combination of the characteristics of the color of the light and the paper.
Projective lights are available on devices with Apple6 GPU family feature support.

## Topics

### Creating a projective texture

[`init(texture:coordinateTransform:)`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture/init(texture:coordinateTransform:))

Creates a new instance with the specified texture and coordinate transform for scale and rotation

[`init(texture:scale:)`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture/init(texture:scale:))

Creates a new instance with the specified texture and scale

### Transforming texture coordinates

[`coordinateTransform`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture/coordinateTransform)

The coordinate transform for the projective texture

[`TextureCoordinateTransform`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture/TextureCoordinateTransform)

### Comparing projective textures

[`==(_:_:)`](/documentation/RealityKit/SpotLightComponent/ProjectiveTexture/==(_:_:))

## Relationships

### Conforms To

[`Component`](/documentation/RealityKit/Component)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)