# GetGraphicsFormat(DefaultFormat)

> Returns the platform-specific GraphicsFormat that is associated with the DefaultFormat.

## Definition

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

```csharp
public static GraphicsFormat GetGraphicsFormat(DefaultFormat format)
```

### Parameters

**** (\[DefaultFormat]\(/engine/6000.0/script-reference/unityengine/experimental/rendering/defaultformat)): The [DefaultFormat](/engine/6000.0/script-reference/unityengine/experimental/rendering/defaultformat.md) format to look up.

### Returns

| Type                                                                                                   | Description |
| ------------------------------------------------------------------------------------------------------ | ----------- |
| [GraphicsFormat](/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat.md) |             |

### Remarks

You can create a RenderTexture with [DefaultFormat.DepthStencil](/engine/6000.0/script-reference/unityengine/experimental/rendering/defaultformat/depthstencil.md) by setting the resulting [GraphicsFormat](/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat.md) to [RenderTexture.depthStencilFormat](/engine/6000.0/script-reference/unityengine/rendertexture/depthstencilformat.md), [RenderTextureDescriptor.depthStencilFormat](/engine/6000.0/script-reference/unityengine/rendertexturedescriptor/depthstencilformat.md) or by using one of the constructors.

To create a [RenderTexture](/engine/6000.0/script-reference/unityengine/rendertexture.md) that you can use as a shadow map, set the [ShadowSamplingMode](/engine/6000.0/script-reference/unityengine/rendering/shadowsamplingmode.md) using [RenderTextureDescriptor.shadowSamplingMode](/engine/6000.0/script-reference/unityengine/rendertexturedescriptor/shadowsamplingmode.md). If you only set the depth or stencil format and not the [ShadowSamplingMode](/engine/6000.0/script-reference/unityengine/rendering/shadowsamplingmode.md) then you will not have a valid shadow map.

Additional Resources: [GraphicsFormat](/engine/6000.0/script-reference/unityengine/experimental/rendering/graphicsformat.md) enum and [DefaultFormat](/engine/6000.0/script-reference/unityengine/experimental/rendering/defaultformat.md).
