3D lights look odd on iOS

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

I was testing out my game on my phone and the lighting looks very odd. is this a bug or is it something with my scene?

Vertex shading is forced by default on mobile to improve performance. This means you can’t have visible shadow maps since all materials will use vertex shading.

Calinou | 2020-12-29 23:14

:bust_in_silhouette: Reply From: PEIGNAULT Laurent

Same for me…

No shadows in iOS by default, need to disable Force vertex Shading.mobile to see it.
But very bad performances and seems that exposure is too high…

Same here : iOS spot light / point light shadows not showing on device · Issue #39014 · godotengine/godot · GitHub and here https://forum.godotengine.org/61690/no-shadows-on-ios-gles3

Is there a way to have a good 3d in iOS performances and shadows ?

Have a nice day.

(Cross-posting from https://github.com/godotengine/godot/issues/39014.)

Real-time lights will always be expensive on mobile devices, especially when shadows are enabled. If you want shadows on mobile, it’s best to use baked lightmaps. The current lightmapper isn’t great but there will be a new one in 3.2.4: [3.2] New CPU lightmapper by JFonS · Pull Request #44628 · godotengine/godot · GitHub

Also, consider rendering the viewport at a lower resolution using the viewport stretch mode and setting a relatively low base resolution. This improves performance tremendeously and is often needed to achieve good 3D performance on mobile. See Multiple resolutions in the documentation for more information.

The optimization tutorials are worth reading if you want to know more optimization tips.

Calinou | 2020-12-29 23:15