private void CreateBodyDepthTexture() { if (bodyMaskTexture == null) { IntPtr bodySRV; if (UnityCompositorInterface.CreateUnityBodyMaskTexture(out bodySRV)) { bodyMaskTexture = Texture2D.CreateExternalTexture(frameWidth, frameHeight, TextureFormat.R16, false, false, bodySRV); bodyMaskTexture.filterMode = FilterMode.Point; bodyMaskTexture.anisoLevel = 0; } } }