Search Issue Tracker
By Design
Votes
5
Found in [Package]
4.0.0-preview.1
Issue ID
1345857
Regression
Yes
[iOS] [ARKit] AR Camera does not update the Target Texture when it is set immediately after loading the Scene
Reproduction steps:
1. Open the attached project "Case_1345857"
2. Build and Deploy the Scene "SampleScene" to an iOS device
3. Observe the Build
Expected result: The Camera updates the Render Texture displayed on Screen
Actual result: The Render Texture does not get updated and displays red
Reproducible with: 4.0.0-preview.1 (2019.4.28f1), 4.1.7 (2019.4.28f1), 4.2.0-pre.9 (2020.3.13f1, 2021.1.14f1, 2021.2.0b2, 2022.2.0a1)
Not reproducible with: 2.1.18, 3.1.10 (2019.4.28f1)
Could not test with: 2018.4 (ARFoundation not available)
Reproduced with:
- iPhone 6 (iOS 12.4.8)
- iPhone 7 (iOS 12.3.1)
- iPhone 12 Mini (iOS 14.1)
Not reproduced with:
VLNQA00122, Samsung Galaxy S9 (SM-G960F), Android 10, CPU: Snapdragon 855 SM8150, GPU: Mali-G72
VLNQA00331, Huawei P20 lite (ANE-LX1), Android 9, CPU: HiSilicon Kirin 659, GPU: Mali-T830
VLNQA00321, Xiaomi MI 9 (MI 9), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
Could not test on:
-- ARCore is not supported --
VLNQA00038, Htc Desire 510 (HTC Desire 510), Android 4.4.3, CPU: Snapdragon 410 MSM8916, GPU: Adreno (TM) 306
VLNQA00285, Samsung Galaxy J4 Core (SM-J410F), Android 8.1.0, CPU: Snapdragon 425 MSM8917, GPU: Adreno (TM) 308
VLNQA00042, Lge LG G3 (LG-D855), Android 5, CPU: Snapdragon 801 MSM8974AC, GPU: Adreno (TM) 330
VLNQA00013 - Galaxy S6 Edge+ (SM-G928F), OS: 7.0.0, CPU: Exynos 7 Octa (7420), GPU: Mali-T760
Notes:
- Waiting before setting the Target Texture of the Camera to the Render Texture can be used as a potential workaround
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Trying to draw gizmos while inside a renderpass" error message is thrown when Scene View Gizmos are enabled
- CPU frame times spike at regular intervals in the Profiler when in Play mode with VSync enabled and using DX12 API
- UI Builder “Create Template” Fails with Invalid UXML and Missing Root Element Errors
- Decal not projected on top of a Lit Material when MSAA is disabled, and Rendering Path is Forward or Forward+ in a Standalone Build
- Separation lines between minimized fields become invisible when scrolling in the Profiler
Resolution Note:
After further investigation, this behavior was found to be by design. When running the example project, we get the informative error: Metal: Error creating pipeline state (Unlit/ARKitBackground): depthAttachmentPixelFormat is not valid and shader writes to depth. This is because the RenderTexture being used is set to 2D and not 3D. Setting renderTexture.depth to a nonzero value fixes the issue. This can be done either programmatically or through the .asset file inspector for the RenderTexture. If the user however, needs the RenderTexture to be 2D they could always copy the Unlit/ARKitBackground shader and remove anything pertaining to depth.