---
title: "setSemantic(_:forSymbol:options:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnprogram/setsemantic(_:forsymbol:options:)"
---

# setSemantic(_:forSymbol:options:)

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

## Declaration

```swift
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

Discussion Use this method to provide inputs managed by SceneKit to your GLSL program. To use vertex attributes provided by 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.

## See Also

### Mapping GLSL Symbols to SceneKit Semantics

- [SCNProgramMappingChannelKey](scenekit/scnprogrammappingchannelkey.md)
- [semantic(forSymbol:)](scenekit/scnprogram/semantic(forsymbol:).md)
- [SCNModelTransform](scenekit/scnmodeltransform.md)
- [SCNModelViewProjectionTransform](scenekit/scnmodelviewprojectiontransform.md)
- [SCNModelViewTransform](scenekit/scnmodelviewtransform.md)
- [SCNNormalTransform](scenekit/scnnormaltransform.md)
- [SCNProjectionTransform](scenekit/scnprojectiontransform.md)
- [SCNViewTransform](scenekit/scnviewtransform.md)
