---
title: constantAttenuation
framework: GLKit
role: symbol
role_heading: Instance Property
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: glkit/glkeffectpropertylight/constantattenuation
---

# constantAttenuation

A constant factor applied to the attenuation of a point light or spotlight.

## Declaration

```swift
var constantAttenuation: GLfloat { get set }
```

## Discussion

Discussion The distance attenuation factor is calculated as 1.0 / (k0 + k1 * d + k2 * d * d), where d represents the distance from the light to the point being lit. The constantAttenuation property is represented in this calculation as k0. The default value is 1.0.

## See Also

### Configuring Lighting Attenuation

- [linearAttenuation](glkit/glkeffectpropertylight/linearattenuation.md)
- [quadraticAttenuation](glkit/glkeffectpropertylight/quadraticattenuation.md)
