<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKLightingType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:@E@GLKLightingType"
  },
  "title" : "GLKLightingType"
}
-->

# GLKLightingType

A constant that describes how lighting is calculated by an effect.

```
enum GLKLightingType
```

## Overview

Typically, per-pixel lighting should be enabled when it provides an improvement in image quality without greatly reducing your application’s performance. Calculating the lighting equation at each fragment greatly increases the number of calculations required to calculate the lighting for a scene. However, calculating lighting only at vertices sometimes produces unusual or inaccurate results, particularly when your application uses spotlights or specular highlighting. For example, when per-pixel lighting is disabled, a narrow spotlight projected at the center of a large triangle may disappear entirely because the vertices that define the triangle all lie outside the area covered by the spotlight. That same triangle, when rendered using per-pixel lighting, would be rendered correctly.

## Topics

### Constants

[`GLKLightingTypePerVertex`](/documentation/GLKit/GLKLightingType/perVertex)

Indicates that the lighting calculations are performed at each vertex in a triangle and then interpolated across the triangle.

[`GLKLightingTypePerPixel`](/documentation/GLKit/GLKLightingType/perPixel)

Indicates that the inputs to the lighting calculation are interpolated across a triangle and the lighting calculations are performed at each fragment.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)