godot/drivers
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
..
alsa Prevent ALSA audio corruption 2020-12-01 09:00:53 +01:00
alsamidi Ensure header guards enclose entire header. 2020-09-04 08:48:35 +02:00
coreaudio SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
coremidi SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
dummy Add a debanding property to Viewport for GLES3 2020-10-20 19:07:15 +02:00
gl_context SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
gles2 Fixes #43667. 2020-12-20 10:32:30 -06:00
gles3 Fix invalid property hint for max_renderable_elements project setting 2020-12-16 19:33:15 +01:00
gles_common Fix ninepatch batch break logic. 2020-11-30 10:29:52 +00:00
png Handle 16 bit PNG files in sRGB format 2020-07-10 08:51:21 +02:00
pulseaudio Ensure header guards enclose entire header. 2020-09-04 08:48:35 +02:00
unix Remove now unused FileAccessBuffered. 2020-12-09 11:36:58 +01:00
wasapi SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
windows Revert "Fix Directory Open Check" 2020-07-28 13:54:13 -04:00
winmidi SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
xaudio2 SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
register_driver_types.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
register_driver_types.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
SCsub Unified GLES2 / GLES3 Batching 2020-10-16 10:34:47 +01:00