class in UnityEngine.Experimental.Rendering
/
Implemented in:UnityEngine.CoreModule
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseThis utility class contains helper functions that enable you to query properties of a TextureFormat, RenderTextureFormat, or GraphicsFormat. This class also includes format conversion and size calculation functions.
ComputeMipChainSize | Computes the memory size in bytes for a chain of mipmaps. |
ComputeMipmapSize | Computes the memory size in bytes for a single mipmap. |
ConvertToAlphaFormat | Input a GraphicsFormat to return an equivalent GraphicsFormat that includes an alpha component. |
GetAlphaComponentCount | Returns the number of alpha components of the format. |
GetBlockHeight | Returns the height in texels of a texel block. |
GetBlockSize | Returns the memory size in bytes of a texel block. |
GetBlockWidth | Returns the width in texels of a texel block. |
GetColorComponentCount | Returns the number of color components of the format. |
GetComponentCount | Returns the number of components this format has. |
GetDepthBits | Returns the number of bits per pixel this format contains for depth. |
GetDepthStencilFormat | Returns a supported depth stencil format that has 'minimumDepthBits' of bits or higher per pixel for the depth component if a compatible format exists on the current platform. If 'minimumStencilBits' is higher than 0, and a compatible format exists on the current platform, Unity returns a depth stencil format with 8 bits per pixel for the stencil component. |
GetFormatString | Returns a string that represents a format enum value. |
GetGraphicsFormat | Translates RenderTextureFormat or TextureFormat into GraphicsFormat. |
GetLinearFormat | Returns the equivalent linear format of a GraphicsFormat. For example, this function returns kFormatR8G8B8A8_UNorm if the input is kFormatR8G8B8A8_SRGB. If the input GraphicsFormat is already linear, this function returns the input GraphicsFormat. |
GetRenderTextureFormat | Translates GraphicsFormat into RenderTextureFormat. |
GetSRGBFormat | Returns the equivalent sRGB format of a GraphicsFormat. For example, this function returns kFormatR8G8B8A8_SRGB if the input is kFormatR8G8B8A8_UNorm. If the input GraphicsFormat is already sRGB, this function returns the input GraphicsFormat. If there is no equivalent sRGB format, this function returns the input GraphicsFormat. |
GetSwizzleA | Returns a FormatSwizzle enum that is mapped to the alpha channel for a given format. |
GetSwizzleB | Returns a FormatSwizzle enum that is mapped to the blue channel for a given format. |
GetSwizzleG | Returns a FormatSwizzle enum that is mapped to the green channel for a given format. |
GetSwizzleR | Returns FormatSwizzle enum of which channel is mapped to the R channel for a given format. |
GetTextureFormat | Translates GraphicsFormat into TextureFormat. |
HasAlphaChannel | Returns true if the format has an alpha component. Returns false otherwise. |
Is16BitPackedFormat | Returns true if the format is packed and a 16-bit format. Returns false otherwise. |
IsAlphaOnlyFormat | Returns true if the format only has an alpha component. Returns false otherwise. |
IsAlphaTestFormat | Returns true if the format has an alpha component with only 1 or 2 bits. Returns false otherwise. |
IsASTCFormat | Returns true if the format uses ASTC. Returns false otherwise. |
IsBCFormat | Returns true if the format is a DXTC, RGTC or BPTC format. Returns false otherwise. |
IsBPTCFormat | Returns true if the format uses BPTC. Returns false otherwise. |
IsCompressedFormat | Returns true if the format is compressed. Returns false otherwise. |
IsCrunchFormat | Returns true if the format data is compressed with Crunch. Returns false otherwise. |
IsDepthFormat | Returns true if the format is a depth format. Returns false otherwise. |
IsDepthStencilFormat | Returns true if the format is a depth or stencil format. Returns false otherwise. |
IsDXTCFormat | Returns true if the format uses DXTC. Returns false otherwise. |
IsEACFormat | Returns true if the format uses EAC. Returns false otherwise. |
IsETCFormat | Returns true if the format uses ETC and ETC2. Returns false otherwise. |
IsFloatFormat | Returns true if the format is a single precision floating point format. Returns false otherwise. |
IsHalfFormat | Returns true if the format is a half precision floating point format. Returns false otherwise. |
IsHDRFormat | Returns true if the format is capable of representing HDR data. Returns false otherwise. |
IsIEEE754Format | Returns true if the format is a floating point format. Returns false otherwise. |
IsIntegerFormat | Returns true if the format is an integer format. Returns false otherwise. |
IsNormFormat | Returns true if the format is a normalized format. Returns false otherwise. |
IsPackedFormat | Returns true if the format is packed. Returns false otherwise. |
IsPVRTCFormat | Returns true if the format uses PVRTC. Returns false otherwise. |
IsRGTCFormat | Returns true if the format uses RGTC. Returns false otherwise. |
IsSignedFormat | Returns true if the format is a signed format. Returns false otherwise. |
IsSIntFormat | Returns true if the format is a signed and integer format. Returns false otherwise. |
IsSNormFormat | Returns true if the format is a signed normalized format. Returns false otherwise. |
IsSRGBFormat | Returns true if the format performs sRGB to linear on read and linear to sRGB on write. Returns false otherwise. |
IsStencilFormat | Returns true if the format is a stencil format. Returns false otherwise. |
IsSwizzleFormat | Returns true if the format is not a RGBA format. Returns false otherwise. |
IsUIntFormat | Returns true if the format is an unsigned and integer format. Returns false otherwise. |
IsUNormFormat | Returns true if the format is an unsigned normalized format. Returns false otherwise. |
IsUnsignedFormat | Returns true if the format is an unsigned format. Returns false otherwise. |
IsXRFormat | Returns true if the format is an extended range format. With extended range format, the blue, green, and red components are linearly encoded, and their values range from -0.752941 to 1.25098. The alpha component is always clamped to a [0.0, 1.0] range in sampling, rendering, and writing operations, despite supporting values outside this range. Returns false otherwise. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.