<!--
{
  "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/SCNRenderer/render(atTime:viewport:commandBuffer:passDescriptor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNRenderer(im)renderAtTime:viewport:commandBuffer:passDescriptor:"
  },
  "title" : "render(atTime:viewport:commandBuffer:passDescriptor:)"
}
-->

# render(atTime:viewport:commandBuffer:passDescriptor:)

Renders the scene’s contents at the specified system time in the specified Metal command buffer.

```
func render(atTime time: CFTimeInterval, viewport: CGRect, commandBuffer: any MTLCommandBuffer, passDescriptor renderPassDescriptor: MTLRenderPassDescriptor)
```

## Parameters

`time`

The timestamp, in seconds, at which to render the scene.

`viewport`

The pixel dimensions in which to render.

`commandBuffer`

The Metal command buffer in which SceneKit should schedule rendering commands.

`renderPassDescriptor`

The Metal render pass descriptor describing the rendering target.

## Discussion

This method can be used only with an [`SCNRenderer`](/documentation/SceneKit/SCNRenderer) object created with the [`SCNRenderer`](/documentation/SceneKit/SCNRenderer) initializer. Call this method to tell SceneKit to draw the renderer’s scene into the render target described by the `renderPassDescriptor` parameter, by encoding render commands into the `commandBuffer` parameter.

When you call this method, SceneKit updates its hierarchy of presentation nodes based on the specified timestamp, and then draws the scene using the specified Metal objects.

> Note:
> By default, the playback timing of actions and animations in a scene is based on the system time, not the scene time. Before using this method to control the playback of animations, set the <doc://com.apple.documentation/documentation/QuartzCore/CAAnimation/usesSceneTimeBase> property of each animation to <doc://com.apple.documentation/documentation/Swift/true>, or specify the ``doc://com.apple.scenekit/documentation/SceneKit/SCNSceneSource/AnimationImportPolicy/playUsingSceneTimeBase`` option when loading a scene file that contains animations.

---

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)