Encapsulate the informations and capabilities related to variable rate shading images.
To accommodate various graphic APIs, post-process configurations, and XR support, shading rate images necessitate both an image and its vertically flipped counterpart. While some combinations directly utilize the image, others mandate a flipped version. Unity has chosen to combine both to simplify developement. The resolution of shading rate images is in tiles and is platform-dependent. Functions that needs to be aware of this will specify how conversion is handled.
AllocFromPixelSize | Creates a shading rate image. This function performs the conversion from pixel to tile before the allocation. |
GetAllocTileSize | Returns the tile size based on the given pixel size. |
GetRenderTextureDescriptor | Utility function to create a RenderTextureDescriptor compatible with a shading rate image. This function does not perform the conversion from pixel to tile. |