<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNProgram/setSemantic(_:forSymbol:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNProgram(im)setSemantic:forSymbol:options:"
  },
  "title" : "setSemantic(_:forSymbol:options:)"
}
-->

# setSemantic(_:forSymbol:options:)

Associates a SceneKit semantic identifier with the specified GLSL vertex attribute or uniform variable.

```
func setSemantic(_ semantic: String?, forSymbol symbol: String, options: [String : Any]? = nil)
```

## Parameters

`semantic`

A SceneKit semantic identifier. See Geometry Semantic Identifiers and Rendering Transform Keys for possible values.

`symbol`

The name declared in the program’s GLSL source code for the vertex attribute or uniform variable to be associated with the semantic.

`options`

A dictionary of options affecting the semantic. See `Program Semantic Options` for applicable keys and values.

## Discussion

Use this method to provide inputs managed by SceneKit to your GLSL program.

To use vertex attributes provided by [`SCNGeometry`](/documentation/SceneKit/SCNGeometry) objects, use the constants listed in Geometry Semantic Identifiers.

To use the coordinate transformations defined by the scene’s node hierarchy and point-of-view camera, use the constants listed in Rendering Transform Keys.

---

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)