<!--
{
  "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/SCNShaderModifierEntryPoint/geometry",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:@SCNShaderModifierEntryPointGeometry"
  },
  "title" : "geometry"
}
-->

# geometry

Use this entry point to deform a geometry’s surface or alter its vertex attributes.

```
static let geometry: SCNShaderModifierEntryPoint
```

## Discussion

Shader modifiers for this entry point execute in the vertex processing stage.

The geometry entry point declares the following structure:

```objc
struct SCNShaderGeometry {
   vec3 position;
   vec3 normal;
   vec4 tangent;
   vec2 texcoords[kSCNTexcoordCount];
} _geometry;
```

Your shader modifier reads from this structure and writes new values to the same structure to alter the geometric properties of each vertex in a geometry.

The `position`, `normal`, and `tangent` fields are expressed in model space. You can use SceneKit’s uniforms (such as `u_modelViewTransform`) to operate in a different coordinate space, but you must convert back to model space before writing results.

The `kSCNTexcoordCount` variable is a constant integer corresponding to the geometry’s number of texture coordinate sources. Each set of coordinates in the `texcoords` field contains raw values from the geometry—SceneKit applies the [`contentsTransform`](/documentation/SceneKit/SCNMaterialProperty/contentsTransform) transformation (if any) after the geometry shader modifier completes.

The below shader modifier produces an animated sinusoidal deformation:

```objc
uniform float Amplitude = 0.1;
 
_geometry.position +=
    _geometry.normal *
    (Amplitude*_geometry.position.y*_geometry.position.x) *
    sin(1.0 * u_time);
```

---

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)