private void CreateDepthCameraTexture() { if (depthTexture == null) { IntPtr depthSRV; if (UnityCompositorInterface.CreateUnityDepthCameraTexture(out depthSRV)) { depthTexture = Texture2D.CreateExternalTexture(frameWidth, frameHeight, TextureFormat.R16, false, false, depthSRV); depthTexture.filterMode = FilterMode.Point; depthTexture.anisoLevel = 0; } } }