MeshInstance with MeshPanle looks good when debuging but when published on phone fades out

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Athrosus

First of all, thank you for taking the time to try and help!

I can’t share the project sorry, and getting footage of the issue would be very cumbersome so I hope you believe me that I described it exactly how it appears.

This is how the shadows(MeshInstance with PlaneMesh) should look like:
Shadows while debuging in godot on PC

But when I publish the project or use the quick test feature for android, the shadows start out invisible for the balls at the top and slowly fade in as they come closer to the camera.

The Shadow PlaneMesh does have the Transparent flag turned on, and the material is Local To Scene if that helps.

I honestly have no idea what the problem could be. Not like I specified culling or a fade-out effect anywhere. The only thing that happens is that the mesh gets moved each frame to make it look like a shadow.

I know the distance to the camera is what makes them fade in but that’s about it.

Welp, if any other unfortunate soul wander across this problem, good luck. I tried A LOT of things but in the end I just added a CylinderMesh for the shadow and called it a day.

Athrosus | 2021-05-14 20:36

:bust_in_silhouette: Reply From: Calinou

By default, vertex shading is forced to mobile platforms on improve performance. This often alters the appearance of shaded materials.

You can disable this by disabling Force Vertex Shading.mobile in the Project Settings. Note that disabling this option will use per-pixel shading instead, which has a performance cost.

Thank you for the help, tho this wasn’t the problem.

This will be very helpful in the future for better debuging.

There’s no change in the shadow’s behaviour whether Force Vertex Shading.mobile is turned on or off.

I tested it a bit more and it seems the size of the shadow has an impact, if I multiply the size of the shadow by 10 it’s visible immediately.
So i tryed this, since the yellow circle that was the shadow was 100x100 I made a 1000x1000 image with a 100x100 yellow circle in the middle and made all the are around the circle translucent. But sadly this didn’t work either which really confused me, so if there’s a 1000x1000 yellow circle it’s visible but if it’s a 100x100 yellow circle in a 1000x1000 image it’s not visible.

Athrosus | 2021-05-09 11:15