godot/drivers/gles2
Forest Katsch 8825aa8b5b Fixes #43667.
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.
2020-12-20 10:32:30 -06:00
..
shaders Fix bug in normal map decompression 2020-12-11 10:34:53 +00:00
rasterizer_canvas_base_gles2.cpp 2d Legacy - close vulnerabilities and more debug checks 2020-11-22 16:09:02 +00:00
rasterizer_canvas_base_gles2.h Add project settings to manually specify API usage 2020-10-31 18:33:55 +00:00
rasterizer_canvas_gles2.cpp Batching - BackBuffer copy fix 2020-11-24 14:59:15 +00:00
rasterizer_canvas_gles2.h Poly colors fixes 2020-11-13 13:23:28 +00:00
rasterizer_gles2.cpp Unified GLES2 / GLES3 Batching 2020-10-16 10:34:47 +01:00
rasterizer_gles2.h Unified GLES2 / GLES3 Batching 2020-10-16 10:34:47 +01:00
rasterizer_scene_gles2.cpp Fix regression in baked lights when using GLES2 2020-11-25 18:12:50 +01:00
rasterizer_scene_gles2.h Add fast approximate antialiasing (FXAA) to Viewport 2020-10-20 14:54:52 +02:00
rasterizer_storage_gles2.cpp Fixes #43667. 2020-12-20 10:32:30 -06:00
rasterizer_storage_gles2.h 2d Legacy - close vulnerabilities and more debug checks 2020-11-22 16:09:02 +00:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
shader_compiler_gles2.cpp Fix mod op (%) implementation in GLES2 2020-10-02 11:43:19 +02:00
shader_compiler_gles2.h GLES2 Batching - prevent baking on VERTEX use in a shader 2020-06-19 09:42:04 +01:00
shader_gles2.cpp Added option to enable high precision float in GLES2 2020-07-30 05:40:15 +02:00
shader_gles2.h Fix the update logic for user-added custom defines. 2020-09-06 21:31:09 -07:00