Would you happen to know if the VFX Graph is also compatible, and if so, which version?
So in terms of the path of least resistance, the template to start a new project with would be 3D, right? LWRP introduces 5.7.2 and I heard mixed things about downgrading packages… The initial LWRP scene seems not to work out of the box.
Finally got it working using the Lightweight RP (Preview) template in 2019.1.0f2. In order to get it to work using the LWRP and Shader Graph 5.6.1 I had to turn on Face Tracking even though I’m not using it. Apparently when it was unchecked it wasn’t being properly stripped out when building the xCode project.
Another issue was the frame rate. I used the LWRP sample scene and just removed the camera and replaced it with the AR Foundation camera (AR Session, AR Session Origin, and adding in the LWRP camera data, etc). The frame rate I was getting was only 17; far below the 30fps that I was targeting, and the CPU usage stayed at ~122%. The iPad model I’m testing on is MP2F2LL/A which only has an A9 chip so I’m not sure if that’s the issue or if the Lightweight RP (Preview) template’s sample scene is just too much for an AR experience.
Anyone else seeing this? Are there other project settings that need to be adjusted to improve frame rate and CPU usage?
I have a project here https://github.com/StigOlavsen/LightweightARFoundation that has a workaround for using AR Foundation with LWRP 5.13. I’ve been told it doesn’t work on Android (haven’t had the chance to test/fix), only on iOS, but it is probably an easy fix if you are adventurous.
This is what I experienced as well. Apparently, the way to fix it is to assign Custom Render Asset in ARCamera. The render asset is provided in LWRPSupport branch in the ARFoundationSample but the codebase is not compatible with the latest LWRP. ARFoundation team needs to fix it so it is compatible with the latest LWRP. I don’t plan to use workaround with older version. Not a suitable solution.
Thanks @steego for the project. I am new to unity and shaders (still learning). I tried your project on Android, tracking and planes are working but camera background is pink. I tried to replace the shader with the one that provided in LWRP Support folder, and changing some properties, but not worked. If you give some pointers for fixing the ARCoreBackgroundLWRP.shader, It will be helpful for me a lot.
Sorry I don’t have much time to look into it right now. The shader requires GLES 3, and the GL_OES_EGL_image_external_essl3 extension, but this should be the same as Unitys project for the old LWRP.
I suspect it might be due to not getting camera permissions, or that the camera isn’t started somehow, but I can’t say for sure without debugging it myself.