Format
typescript
Texture.graphicFormatclass: Texture
Description
(Read Only) The pixel format of the current texture.
The pixel format affects the memory usage and GPU performance of the texture. Different pixel formats are suitable for different texture purposes, such as color textures, normal maps, depth textures, etc. For more information, see GraphicsFormat.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
GraphicsFormat | The pixel format of the current texture. |
Code Example
typescript
let texture = Resources.Load<Texture>(Texture, "textureId");
texture.graphicFormat;