Open oniskanen opened 6 years ago
Hi, thanks for the report. This information is super useful. We'll be doing some investigation about this issue.
Same problem here, when shadows, directional lights and negative scales are combined the camera feed breaks.
Tested with ARCore 1.3 for Unity and several ARCore capable devices.
Is there any news on this issue? @pablisho
Hi, we are still working with Unity to address this issue. A workaround can be devised by detecting negative scale in the background material shader and "correcting" it. We are focused on developing a long term solution with Unity.
Hi, we are still working with Unity to address this issue. A workaround can be devised by detecting negative scale in the background material shader and "correcting" it. We are focused on developing a long term solution with Unity.
Could you explain how to do this?
Has anyone found a solution to this?
Hi @corbinyo , you should be able to add the line:
Cull Off
to this spot in the background shader as a workaround.
@Klipi, the link for the repro project seems to have expired. Could you please provide an updated link?
Here's a hopefully more permanent repro: https://github.com/Klipi/arcore-unity-issue-258
Hi @corbinyo , you should be able to add the line:
Cull Off
to this spot in the background shader as a workaround.
This does work as a workaround, thank you.
Hi @corbinyo , you should be able to add the line:
Cull Off
to this spot in the background shader as a workaround.This does work as a workaround, thank you.
I can confirm that for our project the workaround is good.
Bug is still present in ARCore 1.5.0. Negative scale break camera clearing.
As far as we can tell, this is a Unity issue and not an issue with the ARCore SDK for Unity.
Please use Unity's built-in bug reporting tool to report the issue directly to Unity. Once Unity has assigned a Unity case number, please list the case number here.
Leaving this issue open for tracking purposes for now.
This is a repost of #207 and #169, which were closed since there was no clear repro.
I took the HelloAR example and tried to convert it into a minimal repro, and it appears that an object with negative scale will mess up the rendering when the scene is lit by a Directional Light with Soft Shadows enabled. There's a repro project at https://ufile.io/cgtuh . The archive contains the Unity project, the .apk file for testing, a video capture of the bug and logs. The scene is called HelloAR-NegativeScale-SoftShadows and it contains the ARCore Device prefab, a Directional Light with Soft Shadows enabled and a default Unity Cube with a script attached. The script flips the cube's x-axis scale when tapping the screen.
Here's a screencap of the bug (the object should be a cube):
Logs: Logcat grep "Unity" Full Logcat
The ARCore package is the 1.2.1 release, slightly modified as suggested in #199 and #196 to compile on IL2CPP and .NET4.6. I was able to reproduce the issue on Mono + .NET3.5 as well.
This happens (at least) with Samsung Galaxy S7 Edge (SM-G935F) running Android 8.0.0. App was built with Unity 2018.1.2f1 on macOS 10.13.5.
Let me know if you have difficulties reproducing the issue or find a workaround! Negative scales and shadows both are needed for the project I'm working on.