# RenderBuffer

> Color or depth buffer part of a RenderTexture.

## Definition

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

```csharp
public struct RenderBuffer
```

## Remarks

A single [RenderTexture](/engine/6000.7/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.7/script-reference/unityengine/rendertexture/colorbuffer.md), [RenderTexture.depthBuffer](/engine/6000.7/script-reference/unityengine/rendertexture/depthbuffer.md), [Graphics.activeColorBuffer](/engine/6000.7/script-reference/unityengine/graphics/activecolorbuffer.md), [Graphics.activeDepthBuffer](/engine/6000.7/script-reference/unityengine/graphics/activedepthbuffer.md), [Graphics.SetRenderTarget](/engine/6000.7/script-reference/unityengine/graphics/setrendertarget.md).

## Methods

| Method                                                                                                           | Description                                                                                                                            |
| ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| [GetNativeRenderBufferPtr](/engine/6000.7/script-reference/unityengine/renderbuffer/getnativerenderbufferptr.md) | Returns the native RenderBuffer: an opaque pointer to a Unity struct that you can use with Unity's low-level native plug-in interface. |
