---
title: fragment
framework: scenekit
role: symbol
role_heading: Type Property
path: scenekit/scnshadermodifierentrypoint/fragment
---

# fragment

Use this entry point to change the color of a fragment after all other shading has been performed.

## Declaration

```swift
static let fragment: SCNShaderModifierEntryPoint
```

## Discussion

Discussion Shader modifiers for this entry point execute in the fragment processing stage. The fragment entry point defines the following structure: struct SCNShaderOutput {    vec4 color; } _output; Your shader modifier reads from this structure and writes a new color to the same structure to produce the final output color for each rendered fragment. This shader modifier inverts the output color: _output.color.rgb = vec3(1.0) - _output.color.rgb;

## See Also

### Type Properties

- [geometry](scenekit/scnshadermodifierentrypoint/geometry.md)
- [lightingModel](scenekit/scnshadermodifierentrypoint/lightingmodel.md)
- [surface](scenekit/scnshadermodifierentrypoint/surface.md)
