ドキュメント

Unity Engine

Unity Engine

GetDepthStencilFormat

Returns a supported depth stencil format that has 'depthBits' of bits for the depth component if a compatible format exists on the current platform.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

GetDepthStencilFormat(int)

Returns a supported depth stencil format that has 'depthBits' of bits for the depth component if a compatible format exists on the current platform.
public static GraphicsFormat GetDepthStencilFormat(int depthBits)

Parameters

depthBits

Number of bits that the format should have for the depth component.

Returns

Type

Description

GraphicsFormatA GraphicsFormat that has a depth and/or stencil component.

Remarks

The depth bits are rounded up to 0, 16, 24 or 32 bits. The format is not guaranteed to have a stencil component. Returns the default format for the current platform if no supported format has the requested amount of bits for the depth component.

GetDepthStencilFormat(int, int)

Returns a supported depth stencil format that has 'depthBits' of bits for the depth component if a compatible format exists on the current platform.
public static GraphicsFormat GetDepthStencilFormat(int minimumDepthBits, int minimumStencilBits)

Parameters

minimumDepthBits


minimumStencilBits

Returns

Type

Description

GraphicsFormatA GraphicsFormat that has a depth and/or stencil component.

Remarks

The depth bits are rounded up to 0, 16, 24 or 32 bits. The format is not guaranteed to have a stencil component. Returns the default format for the current platform if no supported format has the requested amount of bits for the depth component.