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.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.