Version: 2023.2

SystemInfo.GetGraphicsFormat

切换到手册

参数

format 要查找的 DefaultFormat 格式。

描述

返回与 DefaultFormat 关联的特定于平台的 GraphicsFormat。

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.