When building to Android the LOD bias and shadow distance are wrong.
My test setup is one build using the same URP pipeline settings asset, and two different scenes;
1) One scene works perfectly using AR Foundation and ground placement; the shadows and LOD's are behaving identical to the editor.
2) In the other scene I'm using Vuforia with an image target and the shadows are rendered as if the user is very far away, while every LOD controller is culling the objects as if the camera is so far away that the object should be less than a few pixels on screen.
I've made sure the scaling of the image target is correct in world scale, e.g. my standard playing card that is 5.5 cm wide is 0.055 units(meters) wide in unity.
I also made sure I am not use the virtual scene scale factor. This is always 1.
I tried debug logging this info in update on the Android build;
Debug.Log("Distance to camera: " + Vector3.Distance(transform.position, imageTargetTransform.position) + " meters"); Debug.Log("LOD bias: " + QualitySettings.lodBias + " max LOD allowed: " + QualitySettings.maximumLODLevel); Debug.Log("Shadow Distance: " + QualitySettings.shadowDistance + " in asset: " + universalRenderPipelineAsset.shadowDistance);
But the distance to the image target is correctly percieved, the LOD bias remains at default 1, and the shadow distance is also correct.
Hi everyone,
Sorry that it took a short while, but thanks to your feedback over the past months we've been able to solve the problem with our latest release of Vuforia Engine (v10.4.4).
Kind regards,
Patrick Scheper
Technical Community Manager