The semantic for per-vertex color data.
SDKs
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Scene
Kit
Declaration
static let color: SCNGeometry Source.Semantic
Discussion
For a geometry source, this semantic identifies data containing a color for each vertex in the geometry. SceneKit interpolates per-vertex colors across a surface to produce smooth shading. Per-vertex colors modulate those produced by lighting and a geometry’s materials, if applicable.
For a custom shader program, you use this semantic to bind SceneKit’s vertex color data to an input attribute of the shader.
Vertex color data is typically an array of three- or four-component vectors.