# RenderBuffer

> Color or depth buffer part of a RenderTexture.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public struct RenderBuffer
```

## Remarks

A single [RenderTexture](/engine/6000.0/script-reference/unityengine/rendertexture.md) object represents both color and depth buffers, but many complex rendering algorithms require using the same depth buffer with multiple color buffers or vice versa.

This class represents either a color or a depth buffer part of a RenderTexture.

Additional Resources: [RenderTexture.colorBuffer](/engine/6000.0/script-reference/unityengine/rendertexture/colorbuffer.md), [RenderTexture.depthBuffer](/engine/6000.0/script-reference/unityengine/rendertexture/depthbuffer.md), [Graphics.activeColorBuffer](/engine/6000.0/script-reference/unityengine/graphics/activecolorbuffer.md), [Graphics.activeDepthBuffer](/engine/6000.0/script-reference/unityengine/graphics/activedepthbuffer.md), [Graphics.SetRenderTarget](/engine/6000.0/script-reference/unityengine/graphics/setrendertarget.md).

## Methods

| Method                                                                                                           | Description                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [GetNativeRenderBufferPtr](/engine/6000.0/script-reference/unityengine/renderbuffer/getnativerenderbufferptr.md) | Returns native RenderBuffer. Be warned this is not native Texture, but rather pointer to unity struct that can be used with native unity API. Currently such API exists only on iOS. |
