Implement async shader compilation plus caching for GL ES 3

Async. compilation via ubershader is currently available in the scene and particles shaders only.

Bonus:
- Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset.
- Remove unused `ENABLE_CLIP_ALPHA` from scene shader.
- Remove unused `PARTICLES_COPY` from the particles shader.
- Remove unused uniform related code.
- Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
This commit is contained in:
Pedro J. Estébanez
2021-09-26 21:31:17 +02:00
parent b6f04dfd21
commit 4c710780d4
43 changed files with 2169 additions and 669 deletions

View File

@@ -268,6 +268,10 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
if (p_flags & DEBUG_FLAG_VIEW_NAVIGATION) {
r_flags.push_back("--debug-navigation");
}
if (p_flags & DEBUG_FLAG_SHADER_FALLBACKS) {
r_flags.push_back("--debug-shader-fallbacks");
}
}
Error EditorExportPlatform::_save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {