Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetGraphicsFormat

Translates RenderTextureFormat or TextureFormat into GraphicsFormat.
Read time 1 minuteLast updated 6 days ago

Definition

GetGraphicsFormat(TextureFormat, bool)

Translates RenderTextureFormat or TextureFormat into GraphicsFormat.
public static GraphicsFormat GetGraphicsFormat(TextureFormat format, bool isSRGB)

Parameters


isSRGB

Returns

Type

Description

GraphicsFormat

Remarks

In Gamma project color space, Unity returns a linear GraphicsFormat regardless of isSRGB and readWrite.

GetGraphicsFormat(RenderTextureFormat, bool)

Translates RenderTextureFormat or TextureFormat into GraphicsFormat.
public static GraphicsFormat GetGraphicsFormat(RenderTextureFormat format, bool isSRGB)

Parameters

Returns

Type

Description

GraphicsFormat

Remarks

In Gamma project color space, Unity returns a linear GraphicsFormat regardless of isSRGB and readWrite.

GetGraphicsFormat(RenderTextureFormat, RenderTextureReadWrite)

Translates RenderTextureFormat or TextureFormat into GraphicsFormat.
public static GraphicsFormat GetGraphicsFormat(RenderTextureFormat format, RenderTextureReadWrite readWrite)

Parameters

Returns

Type

Description

GraphicsFormat

Remarks

In Gamma project color space, Unity returns a linear GraphicsFormat regardless of isSRGB and readWrite.