<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/CustomMaterial/emissiveColor-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation14CustomMaterialV13emissiveColorAC08EmissiveF0Vvp"
  },
  "title" : "emissiveColor"
}
-->

# emissiveColor

The color of light this material emits.

```
var emissiveColor: CustomMaterial.EmissiveColor { get set }
```

## Discussion

With physically based rendering (PBR), you can give entities in
RealityKit the appearance of emitting light. Use this property to
simulate real-world objects that glow, such as objects with LEDs or
computer screens. To enable light emission from a material, set
[`emissiveIntensity`](/documentation/RealityKit/PhysicallyBasedMaterial/emissiveIntensity) to a value greater than
zero, then specify a color (other than black) using this property. You
can specify a single emissive color for the entire material, or use a
UV-mapped image texture to use different colors for different parts of
the entity.

With custom materials, RealityKit doesn’t use
[`emissiveColor`](/documentation/RealityKit/CustomMaterial/emissiveColor-swift.property) automatically to render
your entity.
Call `params.surface().set_emissive_color()` from your surface shader,
otherwise RealityKit renders no light emission.

The following example assigns a tint color to the
[`emissiveColor`](/documentation/RealityKit/PhysicallyBasedMaterial/emissiveColor-swift.property) property,
without a texture:

```swift
self.emissiveColor = PhysicallyBasedMaterial.EmissiveColor(color: .red)
```

This next example uses a texture to specify the
[`emissiveColor`](/documentation/RealityKit/PhysicallyBasedMaterial/emissiveColor-swift.property) property:

```swift
if let emissiveResource = try? TextureResource.load(named: "entity_emissive") {
    let emissiveMap = MaterialParameters.Texture(emissiveResource)
    material.emissiveColor = .init(texture: emissiveMap)
}
```

This Metal code shows how to access the emissive color tint in your
shader functions:

```cpp
half3 emissiveTint = (half3)params.material_constants().emissive_color();
```

The following Metal code demonstrates how to sample the emissive color
texture for the current fragment:

```cpp
// Get the entity's primary texture coordinates.
float2 uv = params.geometry().uv0();

// Flip the y-axis. You only need to do this for entities you load from
// USDZ or .reality files.
uv.y = 1.0 - uv.y;

// Sample the emissive color texture to get the value for this fragment.
auto tex = params.textures();
half3 emissiveColor = (half3)tex.emissive_color()
    .sample(textureSampler, uv).rgb;
```

---

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)