---
title: currentRenderCommandEncoder
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnscenerenderer/currentrendercommandencoder
---

# currentRenderCommandEncoder

The Metal render command encoder in use for the current SceneKit rendering pass.

## Declaration

```swift
var currentRenderCommandEncoder: (any MTLRenderCommandEncoder)? { get }
```

## Discussion

Discussion Use this render command encoder to encode additional rendering commands before or after SceneKit draws its own content. This property is valid only during the SceneKit rendering loop—that is, within one of the methods defined in the SCNSceneRendererDelegate protocol. Accessing this property at any other time returns nil.

## See Also

### Customizing Scene Rendering with Metal

- [device](scenekit/scnscenerenderer/device.md)
- [commandQueue](scenekit/scnscenerenderer/commandqueue.md)
- [colorPixelFormat](scenekit/scnscenerenderer/colorpixelformat.md)
- [depthPixelFormat](scenekit/scnscenerenderer/depthpixelformat.md)
- [stencilPixelFormat](scenekit/scnscenerenderer/stencilpixelformat.md)
