Use this entry point to change the color of a fragment after all other shading has been performed.
- iOS 8.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Shader modifiers for this entry point execute in the fragment processing stage.
The fragment entry point defines the following structure:
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: