I’m trying to get custom material to work using standard rendering pipeline.
I have customMaterial checked on and I assigned a new material but no matter what shader I try (standard, unlit, skybox, etc…) I still don’t see any video on device.
When I check the custom material off everything is working and I do see the video in the background.
Any ideas what shader do I need to use? I’m just looking for a starting point shader that I can build on top off.
Thanks.
Never-mind, I found the answer.
Looks like the ARKitBackground.shader is the one to use.
Yes, and if someone is looking for Android shader, it’s ARCoreBackground.shader.
I also tried using the actual video texture ( CpuImages example) and add it to a Camera Plane (fg video with alpha) but I can’t seem to line it up with the ARCameraBackground bg video. It must be using a different transform to display the video and I don’t know how to access it.
You can subscribe to ARCameraManager.frameReceived to access ARCameraFrameEventArgs.displayMatrix and ARCameraFrameEventArgs.projectionMatrix. Most of all, you need the displayMatrix if you have issues with correct image orientation.