# AllocFromPixelSize(in RenderTextureDescriptor)

> Creates a shading rate image. This function performs the conversion from pixel to tile before the allocation.

## Definition

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

## AllocFromPixelSize(RenderTextureDescriptor)

```csharp
public static RenderTexture AllocFromPixelSize(in RenderTextureDescriptor rtDesc)
```

### Parameters

**** (\[RenderTextureDescriptor]\(/engine/6000.7/script-reference/unityengine/rendertexturedescriptor)): Render texture descriptor where width and height are in pixels.

### Returns

| Type                                                                          | Description                                                    |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [RenderTexture](/engine/6000.7/script-reference/unityengine/rendertexture.md) | The shading rate image for the given size as a render texture. |
