Version: 2021.3
LanguageEnglish
  • C#

SystemInfo.GetGraphicsFormat

Suggest a change

Success!

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.

Close

Submission failed

For 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.

Close

Cancel

Declaration

public static Experimental.Rendering.GraphicsFormat GetGraphicsFormat(Experimental.Rendering.DefaultFormat format);

Parameters

format The DefaultFormat format to look up.

Description

Returns the platform-specific GraphicsFormat that is associated with the DefaultFormat.

You can create a RenderTexture with DefaultFormat.DepthStencil by setting the resulting GraphicsFormat to RenderTexture.depthStencilFormat, RenderTextureDescriptor.depthStencilFormat or by using one of the constructors.

To create a RenderTexture that you can use as a shadow map, set the ShadowSamplingMode using RenderTextureDescriptor.shadowSamplingMode. If you only set the depth or stencil format and not the ShadowSamplingMode then you will not have a valid shadow map.

Additional resources: GraphicsFormat enum and DefaultFormat.