Open AbduSharif opened 2 years ago
For now, we're not doing anything particularly wacky with this, and because GL4ES' extension support and GL3 support is poor/nonexistent, that's likely to stay the case for Android builds for a while. That means that there's the option to hack basic support in just by concatenating source code from all the shaders of the same stage (and deduping the #version
directives, potentially after checking they're the same). Full support (i.e. allowing shaders of the same stage to use different versions and extensions) could be emulated eventually by working out the common superset GLSL version (e.g. 120
is backwards-compatible with 110
, so 120
is the common superset of a #version 110
shader and a #version 120
one) and extension set, and using that for the joined single shader.
The OpenMW nightly version has a new system for linking multiple shaders of the same stage in the same program: https://gitlab.com/OpenMW/openmw/-/merge_requests/1803
This was merged a few hours ago and apparently it causes a hard crash (crashes immediately when at the main menu) when using GL4ES, as an OpenMW developer found out:
They also provided as possible the shaders sources from the GL4ES environment variable: https://github.com/ptitSeb/gl4es/blob/master/USAGE.md#libgl_dbgshaderconv
gl4es_openmw_shaders.txt
I also had the crash on Android: linking_crash.txt