# ShadingRateImage

> Encapsulate the informations and capabilities related to variable rate shading images.

## Definition

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

```csharp
public static class ShadingRateImage
```

## Remarks

To accommodate various graphic APIs, post-process configurations, and XR support, shading rate images need both an image and its vertically flipped version. While some combinations directly use the image, others require a flipped version. To simplify development, Unity combines both. The resolution of shading rate images is stored in tiles and is platform-dependent. Functions that need to be aware of the resolution specify how they handle conversion between tiles and pixels.

Additional Resources: [CommandBuffer.SetShadingRateImage](/engine/6000.5/script-reference/unityengine/rendering/commandbuffer/setshadingrateimage.md), [ShadingRateInfo.supportsPerImageTile](/engine/6000.5/script-reference/unityengine/rendering/shadingrateinfo/supportsperimagetile.md).

## Static Methods

| Method                                                                                                                             | Description                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [AllocFromPixelSize](/engine/6000.5/script-reference/unityengine/rendering/shadingrateimage/allocfrompixelsize.md)                 | Creates a shading rate image. This function performs the conversion from pixel to tile before the allocation.                                                |
| [GetAllocTileSize](/engine/6000.5/script-reference/unityengine/rendering/shadingrateimage/getalloctilesize.md)                     | Returns the tile size based on the given pixel size.                                                                                                         |
| [GetRenderTextureDescriptor](/engine/6000.5/script-reference/unityengine/rendering/shadingrateimage/getrendertexturedescriptor.md) | Utility function to create a RenderTextureDescriptor compatible with a shading rate image. This function does not perform the conversion from pixel to tile. |
