---
title: SpotLightComponent.ProjectiveTexture
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/spotlightcomponent/projectivetexture
---

# SpotLightComponent.ProjectiveTexture

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

## Declaration

```swift
struct ProjectiveTexture
```

## Overview

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.

## Topics

### Creating a projective texture

- [init(texture:coordinateTransform:)](realitykit/spotlightcomponent/projectivetexture/init(texture:coordinatetransform:).md)
- [init(texture:scale:)](realitykit/spotlightcomponent/projectivetexture/init(texture:scale:).md)

### Transforming texture coordinates

- [coordinateTransform](realitykit/spotlightcomponent/projectivetexture/coordinatetransform.md)
- [SpotLightComponent.ProjectiveTexture.TextureCoordinateTransform](realitykit/spotlightcomponent/projectivetexture/texturecoordinatetransform.md)

### Comparing projective textures

- [==(_:_:)](realitykit/spotlightcomponent/projectivetexture/==(_:_:).md)

### Initializers

- [init(texture:)](realitykit/spotlightcomponent/projectivetexture/init(texture:).md)

### Instance Properties

- [texture](realitykit/spotlightcomponent/projectivetexture/texture.md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)

## See Also

### Defining the light contribution

- [SpotLightComponent.SurroundingsLight](realitykit/spotlightcomponent/surroundingslight.md)
