Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
2.98k stars 1.11k forks source link

[Bug] Incorrect size of environment depth texture returned by TryAcquireEnvironmentDepthCpuImage in AROcclusionManager #1106

Open marcinwalus opened 9 months ago

marcinwalus commented 9 months ago

TryAcquireEnvironmentDepthCpuImage in AROcclusionManager returns image with incorrect size. Having EnvironmentDepthMode in AROcclusionManager set to Best environmentDepthTexture property returns texture with size 2048x1536. Using TryAcquireEnvironmentDepthCpuImage on same occlusion manager returns XRCpuImage of size 256x192

To Reproduce Steps to reproduce the behavior:

  1. Open "Assets/Scenes/Occlusion/DepthImages.unity" scene from "ARFoundation samples"
  2. Change EnvironmentDepthMode property to Best in AROcclusionManager attached to "Main Camera" game object
  3. In DisplayDepthImage.cs create code to acquire depth image
  4. Run application on device and attach debugger.

Expected behavior m_OcclusionManager.TryAcquireEnvironmentDepthCpuImage should return image with dimensions: 2048x1536

Actual behavior m_OcclusionManager.TryAcquireEnvironmentDepthCpuImage returns image with dimensions: 256x192

Smartphone (please complete the following information):

XRCpuImage-DepthImage Screenshot 2023-09-27 at 10 30 15

marcinwalus commented 6 months ago

@andyb-unity IN-63824