格式
typescript
RenderTexture.depthStencilFormat所属类: RenderTexture
描述
(只读)深度和模板缓冲区的格式。
该方法返回一个枚举类型,详细介绍见GraphicsFormat。
参数
| 参数名 | 类型 | 描述 |
|---|
返回值
| 类型 | 描述 |
|---|---|
GraphicsFormat | GraphicsFormat枚举值 |
代码示例
typescript
function Test() {
try {
let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
// 获取深度/模板缓冲区的格式
let depthStencilFormat = temp_texture.getDepthStencilFormat();
} catch (error) {
Debug.Log(error);
}
}