-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Artifacts on Android GLES2 with PanoramaSky #43667
Comments
probably related to #37673 |
As @NeoSpark314 mentioned on #33633, the Level 1 of the Sky cubemap is black. So that seems to be the issue. However, I am not quite sure how to solve it. There is some special code for LOD1 on
But I am not sure this is the culprit. I tried messing around with it with no success. |
Any news on this? |
As far as I know, nobody has found a fix to this issue yet. |
The root cause of the issue is that OpenGL ES 2 does not support the `textureCubeLod` function. There are (optional) extensions to support this, but they don't appear to be exposed with the ES2 renderer (even though the hardware needed to support LOD features are certainly available.) The existing shim in `drivers/gles2/shaders/cubemap_filter.glsl` just creates a macro: ``` #define textureCubeLod(img, coord, lod) textureCube(img, coord) ``` But the third parameter of `textureCube` is actually a mip bias, not an absolute mip level. (And it doesn't seem to work regardless.) In this specific case, the `cubemap_filter` should only sample from the first level of the "source" panorama cubemap. In lieu of a method to force a lod level of zero, I've chosen to comment out the switchover from a 2D equirectangular panorama to the cubemap version of the same image, therefore always sampling roughness values from the 2D equirectangular panorama. This may cause additional artifacts or issues across the seam, but at least it prevents the glaringly obvious black areas. --- This same issue (no fragment texture LOD support) has rather large repercussions elsewhere too; it means materials with larger cubemap density (i.e. planar or distant objects) will be far rougher than expected. Since GLES 3 appears to properly support fragment `texture*Lod` functions, switching to the GLES 3 backend would solve this problem. --- Root cause discovered with help from @kaadmy.
Fixed by #44489. |
Godot version:
3.2.3
OS/device including version:
Android, Pixel 2, GLES2
Issue description:

On Editor:
On Android:

Artifacts on objects when WorldEnvironment has a PanoramaSky. If WorldEnvironment is set to color only, this does not happen. There is a ticket related to this (#33633) which says it is fixed by enabling High Precision Float in GLES2 for Android, however it does not seem to fix it. This issues is not present on Desktop or iOS (or any other platform I am aware of)
Steps to reproduce:
Minimal reproduction project:
Repro Project (Includes .apk)
Repro Project (No .apk)
The text was updated successfully, but these errors were encountered: