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.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Experimental.Rendering
- Assembly: UnityEngine.CoreModule
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
Number of bits that the format should have for the depth component.
Returns
Type | Description |
|---|---|
| GraphicsFormat | A 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.
Additional Resources: RenderTexture.depthStencilFormat, RenderTextureDescriptor.depthStencilFormat.
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
Returns
Type | Description |
|---|---|
| GraphicsFormat | A 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.
Additional Resources: RenderTexture.depthStencilFormat, RenderTextureDescriptor.depthStencilFormat.