Using VuforiaRenderer.Instance.VideoBackgroundTexture to display the Vuforia camera feed has a black border.
See attachment. (This camera is flipped because of the unique setup of our AR app) The image is the iPhone 7 I'm testing on, 1334x750, but the actual camera feed is in the bottom-left corner at 834x528?
This seems to be a common issue and all the posts below do not work for me.
https://developer.vuforia.com/forum/unity-extension-technical-discussion/unity-454-black-side https://developer.vuforia.com/forum/unity/ios-front-camera-landscape-mode-black-bars https://developer.vuforia.com/forum/unity-extension-technical-discussion/videotextureinfo-image-size-and-texture-size https://developer.vuforia.com/forum/ios/black-border-issue https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/background-texture-black-strip-iphone-6
- Unity 5.3.4f1
- Vuforia SDK v6.2.10
- iOS IL2CPP build
- iOS 8.0 version as min
- Auto Rotation - Landscape Left/Right
Because of some older plugins, I need to use this old version of Unity. Which means I have to use this older version of Vuforia. Which also means I can't download the Background Texture Access sample as suggested in one of the posts above. I've also tried the SetRevertBackfacing on the camera VideoBackgroundBehaviour OnPreRender and that does nothing.
I've tried figuring out how to scale this to fit the screen perfectly and got it to kinda work for 16:9 screens. This is a very clunky way to do this, as I'm now needing to port to other platforms with different device sizes. There has to be a better way to get the video texture without needing to crop out the black part. I need to show it in the UI in a frame.
This is how I'm currently using it, where CameraImage is a UI RawImage:
if (VuforiaRenderer.Instance.VideoBackgroundTexture != null) { CameraImage.texture = VuforiaRenderer.Instance.VideoBackgroundTexture; }
Any help? Thanks.