Godot version:
Godot 3.2 beta 1, GLES2 renderer
OS/device including version:
Motorola G4 (Android 7)
Issue description:
Serious fragment shading issues on surfaces.

Steps to reproduce:
MeshInstance with a default sphere shapeMeshInstance a material with very low roughness (I used 0.06, any value will work but lower roughnesses have more visible issues)Minimal reproduction project:
There is already an open issue for this in the Godot Oculus mobile repository, but since I can reproduce it on a regular Android device the issue is more relevant here.
CC @NeoSpark314
This is related also to https://github.com/godotengine/godot/issues/32813 (and https://github.com/GodotVR/godot_oculus_mobile/issues/60)
This is a floating point precision issue due to the fact that medp is using 16bits. Some more details are in the oculus mobile issue https://github.com/GodotVR/godot_oculus_mobile/issues/68 including a small performance benchmark of enabling high precision for all computations on the oculus quest. @clayjohn suggested in a discussion on discord that the agreed solution is providing a project setting to enable high precision.
I will look into creating a PR for this.
look at the spotlight shadows images in https://github.com/godotengine/godot/issues/33551

I just tried forcing high precision locally (same method as the PR above), and this issue still persists, albeit in a slightly different form.

@kaadmy can you try disabling in the project quality settings the mobile approximations like shown below?:

@kaadmy I was able to reproduce the issue now also on my oculus quest. Changing the settings did not help. The precision fix in the PR gets rid of the noise; but the dark reflections seem to be an additional issue not fixed by the precision increase.
Same issue occurs here, I've also tried disabling all shading options to no avail. I'll try fixing it locally since I can easily reproduce the issue.
I think I found the cause of the issue: Mip Map level 1 of the prefiltered sky environment map is black!; all other mip levels look correct: here is a render doc trace from the quest with the mip levels visualized:
Mip 0, 1, 2:



I tried disabling mipmap generation (always source from panorama texture and don't blur) and I seem to get much better results:

This is with the default precision (mediump), highp looks very similar but still has some shading discrepancies.
@NeoSpark314 Sorry to interrupt, but since you seem knowledgeable about mipmapping, would you know if it's possible to fix #33519 without too much trouble?
Fixed by #33646.
Hi, this issue still seems to persist under both 3.2.2 and 3.3.3, tested on Oculus Quest 2.


Please open a new issue, as it's likely something in the VR code.
@eastrd It's fixed in 3.2.3 (3.2.2 was released long before this issue was closed).
You have to enable a setting to use it, see #33646.
The issue still remains in 3.2.3, even when setting the high precision float flag. It goes away if I change the WorldEnvironment to be Color. But if it is set to Sky or Sky+Color, the issue is still present. Our project is not VR related. Just a regular Android GLES2 app.
Please open a new issue with a reproduction project.
@akien-mga issue created: https://github.com/godotengine/godot/issues/43667
Most helpful comment
I think I found the cause of the issue: Mip Map level 1 of the prefiltered sky environment map is black!; all other mip levels look correct: here is a render doc trace from the quest with the mip levels visualized:
Mip 0, 1, 2: