Hi all,
Using Unity 2022.3.2f1 with Universal AR 3.1.0 with URP, I was getting a black screen and no tracking when running in the Editor. I got the following error in the console:
d3d11: failed to create 2D texture shader resource view id=196 [D3D error was 80070057]
After some searching online, I found people getting a similar error when creating a Unity Texture2D under URP and passing “false” for the linear parameter, and resolving it by passing “true” instead.
On line 656 of Z.cs there is the following call:
texture = Texture2D.CreateExternalTexture(4, 4, TextureFormat.ARGB32, false, false, ptr);
changing the linear parameter here to true:
texture = Texture2D.CreateExternalTexture(4, 4, TextureFormat.ARGB32, false, true, ptr);
fixes the problem, and the camera feed works properly in play mode, as well as in a webAR build.
Posting this in case it’s useful for anyone else.